summaryrefslogtreecommitdiff
path: root/lib/lsan
diff options
context:
space:
mode:
authorAlex Shlyapnikov <alekseys@google.com>2017-10-26 01:22:48 +0000
committerAlex Shlyapnikov <alekseys@google.com>2017-10-26 01:22:48 +0000
commit0480bcea56dc0a6afd46a98f603a8eb8e02c21f1 (patch)
tree74f40507cdda8c77bbd402fed0c9db7b24c76cf4 /lib/lsan
parentf708c0ca7e3f1785d2702a0d0459f4a092718641 (diff)
[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
Diffstat (limited to 'lib/lsan')
-rw-r--r--lib/lsan/lsan_allocator.h11
1 files 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<AP32> 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;