[msan] Use SizeClassAllocator64 for AArch64
Now that D137666 requires 48-bit VMA for AArch64, we can switch to
SizeClassAllocator64 for a slightly more efficient allocator
(asan/lsan already switched by default).
It seems that we can pick kSpaceBeg = 0xE00000000000ULL to support both Linux
("app-15") and FreeBSD ("high memory").
Reviewed By: #sanitizers, vitalybuka
Differential Revision: https://reviews.llvm.org/D140792
This commit is contained in:
1 parent
01ccf7b3ce
commit
8e0c1aaf6b
1 file changed
+6
-7
@@ -109,17 +109,16 @@ typedef SizeClassAllocator64<AP64> PrimaryAllocator;
|
||||
#elif defined(__aarch64__)
|
||||
static const uptr kMaxAllowedMallocSize = 8UL << 30;
|
||||
|
||||
struct AP32 {
|
||||
static const uptr kSpaceBeg = 0;
|
||||
static const u64 kSpaceSize = SANITIZER_MMAP_RANGE_SIZE;
|
||||
struct AP64 {
|
||||
static const uptr kSpaceBeg = 0xE00000000000ULL;
|
||||
static const uptr kSpaceSize = 0x40000000000; // 4T.
|
||||
static const uptr kMetadataSize = sizeof(Metadata);
|
||||
typedef __sanitizer::CompactSizeClassMap SizeClassMap;
|
||||
static const uptr kRegionSizeLog = 20;
|
||||
using AddressSpaceView = LocalAddressSpaceView;
|
||||
typedef DefaultSizeClassMap SizeClassMap;
|
||||
typedef MsanMapUnmapCallback MapUnmapCallback;
|
||||
static const uptr kFlags = 0;
|
||||
using AddressSpaceView = LocalAddressSpaceView;
|
||||
};
|
||||
typedef SizeClassAllocator32<AP32> PrimaryAllocator;
|
||||
typedef SizeClassAllocator64<AP64> PrimaryAllocator;
|
||||
#endif
|
||||
typedef CombinedAllocator<PrimaryAllocator> Allocator;
|
||||
typedef Allocator::AllocatorCache AllocatorCache;
|
||||
|
||||
Reference in new issue
Block a user