Index: compiler-rt/trunk/lib/asan/asan_allocator.h =================================================================== --- compiler-rt/trunk/lib/asan/asan_allocator.h +++ compiler-rt/trunk/lib/asan/asan_allocator.h @@ -186,14 +186,8 @@ static const uptr kNumberOfSizeClasses = SizeClassMap::kNumClasses; template -using SecondaryAllocatorASVT = - LargeMmapAllocator; -template using AsanAllocatorASVT = - CombinedAllocator, - SecondaryAllocatorASVT, - AddressSpaceView>; + CombinedAllocator>; using AsanAllocator = AsanAllocatorASVT; using AllocatorCache = AsanAllocator::AllocatorCache; Index: compiler-rt/trunk/lib/hwasan/hwasan_allocator.h =================================================================== --- compiler-rt/trunk/lib/hwasan/hwasan_allocator.h +++ compiler-rt/trunk/lib/hwasan/hwasan_allocator.h @@ -61,8 +61,7 @@ static const uptr kFlags = 0; }; typedef SizeClassAllocator64 PrimaryAllocator; -typedef LargeMmapAllocator SecondaryAllocator; -typedef CombinedAllocator Allocator; +typedef CombinedAllocator Allocator; typedef Allocator::AllocatorCache AllocatorCache; void AllocatorSwallowThreadLocalCache(AllocatorCache *cache); Index: compiler-rt/trunk/lib/lsan/lsan_allocator.h =================================================================== --- compiler-rt/trunk/lib/lsan/lsan_allocator.h +++ compiler-rt/trunk/lib/lsan/lsan_allocator.h @@ -90,15 +90,7 @@ #endif template -using SecondaryAllocatorASVT = - LargeMmapAllocator; - -template -using AllocatorASVT = - CombinedAllocator, - SecondaryAllocatorASVT, - AddressSpaceView>; +using AllocatorASVT = CombinedAllocator>; using Allocator = AllocatorASVT; using AllocatorCache = Allocator::AllocatorCache; Index: compiler-rt/trunk/lib/msan/msan_allocator.cc =================================================================== --- compiler-rt/trunk/lib/msan/msan_allocator.cc +++ compiler-rt/trunk/lib/msan/msan_allocator.cc @@ -108,8 +108,7 @@ }; typedef SizeClassAllocator32 PrimaryAllocator; #endif -typedef LargeMmapAllocator SecondaryAllocator; -typedef CombinedAllocator Allocator; +typedef CombinedAllocator Allocator; typedef Allocator::AllocatorCache AllocatorCache; static Allocator allocator; Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator_combined.h =================================================================== --- compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator_combined.h +++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator_combined.h @@ -19,18 +19,15 @@ // When allocating 2^x bytes it should return 2^x aligned chunk. // PrimaryAllocator is used via a local AllocatorCache. // SecondaryAllocator can allocate anything, but is not efficient. -template // NOLINT +template class CombinedAllocator { public: using AllocatorCache = SizeClassAllocatorLocalCache; - using AddressSpaceView = AddressSpaceViewTy; - static_assert(is_same::value, - "PrimaryAllocator is using wrong AddressSpaceView"); - static_assert(is_same::value, - "SecondaryAllocator is using wrong AddressSpaceView"); + using SecondaryAllocator = + LargeMmapAllocator; void InitLinkerInitialized(s32 release_to_os_interval_ms) { stats_.InitLinkerInitialized(); Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator_internal.h =================================================================== --- compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator_internal.h +++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator_internal.h @@ -34,11 +34,8 @@ }; typedef SizeClassAllocator32 PrimaryInternalAllocator; -typedef LargeMmapAllocator - SecondaryInternalAllocator; - -typedef CombinedAllocator +typedef CombinedAllocator InternalAllocator; typedef InternalAllocator::AllocatorCache InternalAllocatorCache; Index: compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator_test.cc =================================================================== --- compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator_test.cc +++ compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator_test.cc @@ -615,9 +615,9 @@ a.Deallocate(&stats, p); } -template +template void TestCombinedAllocator() { - typedef CombinedAllocator Allocator; + typedef CombinedAllocator Allocator; Allocator *a = new Allocator; a->Init(kReleaseToOSIntervalNever); std::mt19937 r; @@ -683,26 +683,26 @@ #if SANITIZER_CAN_USE_ALLOCATOR64 TEST(SanitizerCommon, CombinedAllocator64) { - TestCombinedAllocator>(); + TestCombinedAllocator(); } TEST(SanitizerCommon, CombinedAllocator64Dynamic) { - TestCombinedAllocator>(); + TestCombinedAllocator(); } #if !SANITIZER_ANDROID TEST(SanitizerCommon, CombinedAllocator64Compact) { - TestCombinedAllocator>(); + TestCombinedAllocator(); } #endif TEST(SanitizerCommon, CombinedAllocator64VeryCompact) { - TestCombinedAllocator>(); + TestCombinedAllocator(); } #endif TEST(SanitizerCommon, CombinedAllocator32Compact) { - TestCombinedAllocator>(); + TestCombinedAllocator(); } template Index: compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator_testlib.cc =================================================================== --- compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator_testlib.cc +++ compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator_testlib.cc @@ -49,8 +49,7 @@ namespace { typedef SizeClassAllocator64<__AP64> PrimaryAllocator; -typedef LargeMmapAllocator<> SecondaryAllocator; -typedef CombinedAllocator Allocator; +typedef CombinedAllocator Allocator; typedef Allocator::AllocatorCache AllocatorCache; static Allocator allocator; Index: compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.h =================================================================== --- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.h +++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.h @@ -79,8 +79,7 @@ }; typedef SizeClassAllocator64 PrimaryAllocator; #endif -typedef LargeMmapAllocator SecondaryAllocator; -typedef CombinedAllocator Allocator; +typedef CombinedAllocator Allocator; typedef Allocator::AllocatorCache AllocatorCache; Allocator *allocator(); #endif