diff options
author | Kostya Kortchinsky <kostyak@google.com> | 2019-04-30 14:56:18 +0000 |
---|---|---|
committer | Kostya Kortchinsky <kostyak@google.com> | 2019-04-30 14:56:18 +0000 |
commit | 8d158e4bfb63c4792b7135d0625fcc4592dcac7b (patch) | |
tree | 04d46547b270323f9b84484cb9038e0e8105fee9 /lib/scudo/standalone/size_class_map.h | |
parent | d201961150fe163d41c4e0bf9c296ed69780d3b2 (diff) | |
download | compiler-rt-8d158e4bfb63c4792b7135d0625fcc4592dcac7b.tar.gz |
[scudo][standalone] Add the memory reclaiming mechanism
Summary:
This CL implements the memory reclaiming function `releaseFreeMemoryToOS`
and its associated classes. Most of this code was originally written by
Aleksey for the Primary64 in sanitizer_common, and I made some changes to
be able to implement 32-bit reclaiming as well. The code has be restructured
a bit to accomodate for freelist of batches instead of the freearray used
in the current sanitizer_common code.
Reviewers: eugenis, vitalybuka, morehouse, hctim
Reviewed By: vitalybuka
Subscribers: srhines, mgorny, delcypher, #sanitizers, llvm-commits
Tags: #llvm, #sanitizers
Differential Revision: https://reviews.llvm.org/D61214
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@359567 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/scudo/standalone/size_class_map.h')
-rw-r--r-- | lib/scudo/standalone/size_class_map.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/scudo/standalone/size_class_map.h b/lib/scudo/standalone/size_class_map.h index 50320701b..b7df54cf8 100644 --- a/lib/scudo/standalone/size_class_map.h +++ b/lib/scudo/standalone/size_class_map.h @@ -31,8 +31,8 @@ namespace scudo { // // This class also gives a hint to a thread-caching allocator about the amount // of chunks that can be cached per-thread: -// - MaxNumCachedHint is a hint for the max number of chunks cached per class. -// - 2^MaxBytesCachedLog is the max number of bytes cached per class. +// - MaxNumCachedHint is a hint for the max number of chunks cached per class. +// - 2^MaxBytesCachedLog is the max number of bytes cached per class. template <u8 NumBits, u8 MinSizeLog, u8 MidSizeLog, u8 MaxSizeLog, u32 MaxNumCachedHintT, u8 MaxBytesCachedLog> |