FailedChanges

Summary

  1. [scudo][standalone] Add a free list to the Secondary (details)
Commit 19ea1d46ccfe7decd623ba3f860d8ba7a9f1bb44 by kostyak
[scudo][standalone] Add a free list to the Secondary
Summary: The secondary allocator is slow, because we map and unmap each
block on allocation and deallocation.
While I really like the security benefits of such a behavior, this
yields very disappointing performance numbers on Android for larger
allocation benchmarks.
So this change adds a free list to the secondary, that will hold
recently deallocated chunks, and (currently) release the extraneous
memory. This allows to save on some memory mapping operations on
allocation and deallocation. I do not think that this lowers the
security of the secondary, but can increase the memory footprint a
little bit (RSS & VA).
The maximum number of blocks the free list can hold is templatable,
`0U` meaning that we fallback to the old behavior. The higher that
number, the higher the extra memory footprint.
I added default configurations for all our platforms, but they are
likely to change in the near future based on needs and feedback.
Reviewers: hctim, morehouse, cferris, pcc, eugenis, vitalybuka
Subscribers: mgorny, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D69570
The file was modifiedcompiler-rt/lib/scudo/standalone/allocator_config.h
The file was modifiedcompiler-rt/lib/scudo/standalone/combined.h
The file was modifiedcompiler-rt/lib/scudo/standalone/secondary.h
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/secondary_test.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/CMakeLists.txt
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/combined_test.cpp
The file was removedcompiler-rt/lib/scudo/standalone/secondary.cpp