summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/asan/asan_allocator.h
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2016-09-13 19:05:33 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2016-09-13 19:05:33 +0000
commitec3e436a36c4a79f8d1e17166c195b72d11df40b (patch)
tree38578cbabb3b5efe8cbd56a08ee86a5a730876b9 /compiler-rt/lib/asan/asan_allocator.h
parent481ddc3793d36fa286748fba561e140f5aad6e4b (diff)
downloadbcm5719-llvm-ec3e436a36c4a79f8d1e17166c195b72d11df40b.tar.gz
bcm5719-llvm-ec3e436a36c4a79f8d1e17166c195b72d11df40b.zip
Switch to 64-bit allocator on android/aarch64.
This uses the "very compact" size class mapping that fits in the 39-bit address space. llvm-svn: 281371
Diffstat (limited to 'compiler-rt/lib/asan/asan_allocator.h')
-rw-r--r--compiler-rt/lib/asan/asan_allocator.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/compiler-rt/lib/asan/asan_allocator.h b/compiler-rt/lib/asan/asan_allocator.h
index 625e6edfd32..545ca04a8fd 100644
--- a/compiler-rt/lib/asan/asan_allocator.h
+++ b/compiler-rt/lib/asan/asan_allocator.h
@@ -119,16 +119,22 @@ struct AsanMapUnmapCallback {
# if defined(__powerpc64__)
const uptr kAllocatorSpace = 0xa0000000000ULL;
const uptr kAllocatorSize = 0x20000000000ULL; // 2T.
+typedef DefaultSizeClassMap SizeClassMap;
+# elif defined(__aarch64__) && SANITIZER_ANDROID
+const uptr kAllocatorSpace = 0x3000000000ULL;
+const uptr kAllocatorSize = 0x2000000000ULL; // 128G.
+typedef VeryCompactSizeClassMap SizeClassMap;
# elif defined(__aarch64__)
-// AArch64/SANITIZIER_CAN_USER_ALLOCATOR64 is only for 42-bit VMA
+// AArch64/SANITIZER_CAN_USER_ALLOCATOR64 is only for 42-bit VMA
// so no need to different values for different VMA.
const uptr kAllocatorSpace = 0x10000000000ULL;
const uptr kAllocatorSize = 0x10000000000ULL; // 3T.
+typedef DefaultSizeClassMap SizeClassMap;
# else
const uptr kAllocatorSpace = 0x600000000000ULL;
const uptr kAllocatorSize = 0x40000000000ULL; // 4T.
-# endif
typedef DefaultSizeClassMap SizeClassMap;
+# endif
struct AP64 { // Allocator64 parameters. Deliberately using a short name.
static const uptr kSpaceBeg = kAllocatorSpace;
static const uptr kSpaceSize = kAllocatorSize;
OpenPOWER on IntegriCloud