From 0480bcea56dc0a6afd46a98f603a8eb8e02c21f1 Mon Sep 17 00:00:00 2001 From: Alex Shlyapnikov Date: Thu, 26 Oct 2017 01:22:48 +0000 Subject: [LSan] Adjust LSan allocator limits for PPC64. Summary: Now the limits are the same as for ASan allocator. Reviewers: cryptoad Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39309 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@316633 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/lsan/lsan_allocator.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/lsan/lsan_allocator.h b/lib/lsan/lsan_allocator.h index 5a0d94c71..4006f7929 100644 --- a/lib/lsan/lsan_allocator.h +++ b/lib/lsan/lsan_allocator.h @@ -68,9 +68,16 @@ struct AP32 { }; typedef SizeClassAllocator32 PrimaryAllocator; #elif defined(__x86_64__) || defined(__powerpc64__) +# if defined(__powerpc64__) +const uptr kAllocatorSpace = 0xa0000000000ULL; +const uptr kAllocatorSize = 0x20000000000ULL; // 2T. +# else +const uptr kAllocatorSpace = 0x600000000000ULL; +const uptr kAllocatorSize = 0x40000000000ULL; // 4T. +# endif struct AP64 { // Allocator64 parameters. Deliberately using a short name. - static const uptr kSpaceBeg = 0x600000000000ULL; - static const uptr kSpaceSize = 0x40000000000ULL; // 4T. + static const uptr kSpaceBeg = kAllocatorSpace; + static const uptr kSpaceSize = kAllocatorSize; static const uptr kMetadataSize = sizeof(ChunkMetadata); typedef DefaultSizeClassMap SizeClassMap; typedef NoOpMapUnmapCallback MapUnmapCallback; -- cgit v1.2.1