[scudo][standalone] Introduce the SizeClassMap
authorKostya Kortchinsky <kostyak@google.com>
Thu, 25 Apr 2019 15:49:34 +0000 (15:49 +0000)
committerKostya Kortchinsky <kostyak@google.com>
Thu, 25 Apr 2019 15:49:34 +0000 (15:49 +0000)
commit3fad6a206f52403886e673739f56abeeca8d309e
tree7b1a8e9306e4a2a8b3866299259f184e922eec11
parentb534f7245cff3856c12640be1e1fb7853a4ae513
[scudo][standalone] Introduce the SizeClassMap

Summary:
As with the sanitizer_common allocator, the SCM allows for efficient
mapping between sizes and size-classes, table-free.

It doesn't depart significantly from the original, except that we
allow the use of size-class 0 for other purposes (as opposed to
chunks of size 0). The Primary will use it to hold TransferBatches.

Reviewers: vitalybuka, eugenis, hctim, morehouse

Reviewed By: vitalybuka

Subscribers: srhines, mgorny, delcypher, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

Differential Revision: https://reviews.llvm.org/D61088

llvm-svn: 359199
compiler-rt/lib/scudo/standalone/CMakeLists.txt
compiler-rt/lib/scudo/standalone/common.h
compiler-rt/lib/scudo/standalone/size_class_map.h [new file with mode: 0644]
compiler-rt/lib/scudo/standalone/tests/CMakeLists.txt
compiler-rt/lib/scudo/standalone/tests/size_class_map_test.cc [new file with mode: 0644]