diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2017-03-21 15:31:15 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2017-03-21 15:31:15 +0000 |
commit | 9ede2ebf28902cdeadca20a5ff279082b8ba4cd7 (patch) | |
tree | 03520f34bc496d27aa66d8a17f7d9cc1c8645dac /lib/lsan/lsan_allocator.h | |
parent | 8f117382b967d5e5c4f27a10477de1ea65b76be1 (diff) |
Revert r298274: "Use pthreads for thread-local lsan allocator cache on darwin"
This fixes a failure currently present on the upstream linux boxes (and
reproduces for me as well):
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/1130/steps/64-bit%20check-asan-dynamic/logs/stdio
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@298382 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/lsan/lsan_allocator.h')
-rw-r--r-- | lib/lsan/lsan_allocator.h | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/lib/lsan/lsan_allocator.h b/lib/lsan/lsan_allocator.h index 9c3dce97a..f56460119 100644 --- a/lib/lsan/lsan_allocator.h +++ b/lib/lsan/lsan_allocator.h @@ -15,10 +15,8 @@ #ifndef LSAN_ALLOCATOR_H #define LSAN_ALLOCATOR_H -#include "sanitizer_common/sanitizer_allocator.h" #include "sanitizer_common/sanitizer_common.h" #include "sanitizer_common/sanitizer_internal_defs.h" -#include "lsan_common.h" namespace __lsan { @@ -36,41 +34,6 @@ void GetAllocatorCacheRange(uptr *begin, uptr *end); void AllocatorThreadFinish(); void InitializeAllocator(); -struct ChunkMetadata { - u8 allocated : 8; // Must be first. - ChunkTag tag : 2; -#if SANITIZER_WORDSIZE == 64 - uptr requested_size : 54; -#else - uptr requested_size : 32; - uptr padding : 22; -#endif - u32 stack_trace_id; -}; - -#if defined(__mips64) || defined(__aarch64__) || defined(__i386__) -static const uptr kRegionSizeLog = 20; -static const uptr kNumRegions = SANITIZER_MMAP_RANGE_SIZE >> kRegionSizeLog; -typedef TwoLevelByteMap<(kNumRegions >> 12), 1 << 12> ByteMap; -typedef CompactSizeClassMap SizeClassMap; -typedef SizeClassAllocator32<0, SANITIZER_MMAP_RANGE_SIZE, - sizeof(ChunkMetadata), SizeClassMap, kRegionSizeLog, ByteMap> - PrimaryAllocator; -#elif defined(__x86_64__) -struct AP64 { // Allocator64 parameters. Deliberately using a short name. - static const uptr kSpaceBeg = 0x600000000000ULL; - static const uptr kSpaceSize = 0x40000000000ULL; // 4T. - static const uptr kMetadataSize = sizeof(ChunkMetadata); - typedef DefaultSizeClassMap SizeClassMap; - typedef NoOpMapUnmapCallback MapUnmapCallback; - static const uptr kFlags = 0; -}; - -typedef SizeClassAllocator64<AP64> PrimaryAllocator; -#endif -typedef SizeClassAllocatorLocalCache<PrimaryAllocator> AllocatorCache; - -AllocatorCache *GetAllocatorCache(); } // namespace __lsan #endif // LSAN_ALLOCATOR_H |