[scudo] Add a method to force release everything.
authorChristopher Ferris <cferris@google.com>
Tue, 14 Mar 2023 20:27:32 +0000 (13:27 -0700)
committerChristopher Ferris <cferris@google.com>
Thu, 16 Mar 2023 00:29:19 +0000 (17:29 -0700)
commit8aaefa92436cf7f66e107795d8513db1285952ac
tree714177a4e38c0ca769cb1cf0317ef2d86bce8c63
parente95d9c92208e659d3e3929b941ff72ec5494b4ec
[scudo] Add a method to force release everything.

The force flag to releaseToOSMaybe does not release everything
since it is an expensive operation. Modify the release flag to
have three states: normal, force, forceall. Force behaves the same
as setting Force to true from before this change. Forceall will
release everything regardless of how much time it takes, or
how much there is to release.

In addition, add a new mallopt that will call the release function
with the forceall flag set.

Reviewed By: Chia-hungDuan

Differential Revision: https://reviews.llvm.org/D146106
compiler-rt/lib/scudo/standalone/combined.h
compiler-rt/lib/scudo/standalone/common.h
compiler-rt/lib/scudo/standalone/include/scudo/interface.h
compiler-rt/lib/scudo/standalone/primary32.h
compiler-rt/lib/scudo/standalone/primary64.h
compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
compiler-rt/lib/scudo/standalone/tests/primary_test.cpp
compiler-rt/lib/scudo/standalone/wrappers_c.inc