summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlex Shlyapnikov <alekseys@google.com>2017-10-23 17:12:07 +0000
committerAlex Shlyapnikov <alekseys@google.com>2017-10-23 17:12:07 +0000
commita21db44b446dc6e7db373e6cc4c57c9cdbd768c9 (patch)
treeacc1755d97ff247ff926634642d1d8ef5cba3fe1 /include
parente378f8791d2d42e4c3f26033ba20a1bf4b43d2d5 (diff)
[Sanitizers] New sanitizer API to purge allocator quarantine.
Summary: Purging allocator quarantine and returning memory to OS might be desired between fuzzer iterations since, most likely, the quarantine is not going to catch bugs in the code under fuzz, but reducing RSS might significantly prolong the fuzzing session. Reviewers: cryptoad Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D39153 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@316347 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/sanitizer/allocator_interface.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/sanitizer/allocator_interface.h b/include/sanitizer/allocator_interface.h
index 522063161..2d35804b3 100644
--- a/include/sanitizer/allocator_interface.h
+++ b/include/sanitizer/allocator_interface.h
@@ -76,6 +76,13 @@ extern "C" {
void (*malloc_hook)(const volatile void *, size_t),
void (*free_hook)(const volatile void *));
+ /* Drains allocator quarantines (calling thread's and global ones), returns
+ freed memory back to OS and releases other non-essential internal allocator
+ resources in attempt to reduce process RSS.
+ Currently available with ASan only.
+ */
+ void __sanitizer_purge_allocator();
+
#ifdef __cplusplus
} // extern "C"
#endif