summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/scudo/scudo_allocator.h8
-rw-r--r--lib/scudo/scudo_allocator_combined.h3
2 files changed, 7 insertions, 4 deletions
diff --git a/lib/scudo/scudo_allocator.h b/lib/scudo/scudo_allocator.h
index 7a92e4142..0efa5c520 100644
--- a/lib/scudo/scudo_allocator.h
+++ b/lib/scudo/scudo_allocator.h
@@ -100,11 +100,13 @@ typedef SizeClassAllocator32<AP32> PrimaryT;
#endif // SANITIZER_CAN_USE_ALLOCATOR64
#include "scudo_allocator_secondary.h"
-#include "scudo_allocator_combined.h"
typedef LargeMmapAllocator SecondaryT;
-typedef CombinedAllocator<PrimaryT, SecondaryT> BackendT;
-typedef BackendT::AllocatorCache AllocatorCacheT;
+
+#include "scudo_allocator_combined.h"
+
+typedef CombinedAllocator BackendT;
+typedef CombinedAllocator::AllocatorCache AllocatorCacheT;
void initScudo();
diff --git a/lib/scudo/scudo_allocator_combined.h b/lib/scudo/scudo_allocator_combined.h
index 4e9217cdd..d61cc9ec1 100644
--- a/lib/scudo/scudo_allocator_combined.h
+++ b/lib/scudo/scudo_allocator_combined.h
@@ -18,9 +18,10 @@
# error "This file must be included inside scudo_allocator.h."
#endif
-template <class PrimaryAllocator, class SecondaryAllocator>
class CombinedAllocator {
public:
+ using PrimaryAllocator = PrimaryT;
+ using SecondaryAllocator = SecondaryT;
using AllocatorCache = typename PrimaryAllocator::AllocatorCache;
void init(s32 ReleaseToOSIntervalMs) {
Primary.Init(ReleaseToOSIntervalMs);