From: Dmitry Vyukov Date: Sat, 26 Jul 2014 10:17:26 +0000 (+0000) Subject: tsan: reduce internal allocator region from 16M to 1M X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4baa65518be9c287a869bf5daf7eaf7e7a768a3b;p=platform%2Fupstream%2Fllvm.git tsan: reduce internal allocator region from 16M to 1M 16M regions can waste almost 1G for nothing. Since region size is used only during initial heap growth, it's unclear why we even need such huge regions. llvm-svn: 214027 --- diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_allocator_internal.h b/compiler-rt/lib/sanitizer_common/sanitizer_allocator_internal.h index bc81933..005a010 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_allocator_internal.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_allocator_internal.h @@ -25,13 +25,12 @@ typedef CompactSizeClassMap InternalSizeClassMap; static const uptr kInternalAllocatorSpace = 0; static const u64 kInternalAllocatorSize = SANITIZER_MMAP_RANGE_SIZE; -#if SANITIZER_WORDSIZE == 32 static const uptr kInternalAllocatorRegionSizeLog = 20; +#if SANITIZER_WORDSIZE == 32 static const uptr kInternalAllocatorNumRegions = kInternalAllocatorSize >> kInternalAllocatorRegionSizeLog; typedef FlatByteMap ByteMap; #else -static const uptr kInternalAllocatorRegionSizeLog = 24; static const uptr kInternalAllocatorNumRegions = kInternalAllocatorSize >> kInternalAllocatorRegionSizeLog; typedef TwoLevelByteMap<(kInternalAllocatorNumRegions >> 12), 1 << 12> ByteMap;