diff options
author | Kostya Serebryany <kcc@google.com> | 2016-08-26 00:06:03 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2016-08-26 00:06:03 +0000 |
commit | e935ff9a6cfde96dabc31a60d010d2d331c31371 (patch) | |
tree | 0d400cc074cffcefe4993b08a1aa6a0dbf732287 /lib/scudo/scudo_allocator.cpp | |
parent | d95894229a58211d3691a8bc9c908ae7f4d59471 (diff) |
[sanitizer] enable random shuffling the memory chunks inside the allocator, under a flag. Set this flag for the scudo allocator, add a test.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@279793 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/scudo/scudo_allocator.cpp')
-rw-r--r-- | lib/scudo/scudo_allocator.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/scudo/scudo_allocator.cpp b/lib/scudo/scudo_allocator.cpp index b5d8fc8bf..d5284a53e 100644 --- a/lib/scudo/scudo_allocator.cpp +++ b/lib/scudo/scudo_allocator.cpp @@ -38,6 +38,8 @@ struct AP { static const uptr kMetadataSize = 0; typedef DefaultSizeClassMap SizeClassMap; typedef NoOpMapUnmapCallback MapUnmapCallback; + static const uptr kFlags = + SizeClassAllocator64FlagMasks::kRandomShuffleChunks; }; typedef SizeClassAllocator64<AP> PrimaryAllocator; |