diff --git a/compiler-rt/lib/scudo/scudo_allocator.h b/compiler-rt/lib/scudo/scudo_allocator.h --- a/compiler-rt/lib/scudo/scudo_allocator.h +++ b/compiler-rt/lib/scudo/scudo_allocator.h @@ -107,11 +107,13 @@ #endif // SANITIZER_CAN_USE_ALLOCATOR64 #include "scudo_allocator_secondary.h" -#include "scudo_allocator_combined.h" typedef LargeMmapAllocator SecondaryT; -typedef CombinedAllocator BackendT; -typedef BackendT::AllocatorCache AllocatorCacheT; + +#include "scudo_allocator_combined.h" + +typedef CombinedAllocator BackendT; +typedef CombinedAllocator::AllocatorCache AllocatorCacheT; void initScudo(); diff --git a/compiler-rt/lib/scudo/scudo_allocator_combined.h b/compiler-rt/lib/scudo/scudo_allocator_combined.h --- a/compiler-rt/lib/scudo/scudo_allocator_combined.h +++ b/compiler-rt/lib/scudo/scudo_allocator_combined.h @@ -18,9 +18,10 @@ # error "This file must be included inside scudo_allocator.h." #endif -template class CombinedAllocator { public: + using PrimaryAllocator = PrimaryT; + using SecondaryAllocator = SecondaryT; using AllocatorCache = typename PrimaryAllocator::AllocatorCache; void init(s32 ReleaseToOSIntervalMs) { Primary.Init(ReleaseToOSIntervalMs);