[compiler-rt] [scudo] Let allocator config limit the page releasing interval (PR #89114)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 17 11:12:12 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: None (ChiaHungDuan)
<details>
<summary>Changes</summary>
On Android, this interval constraint was used to avoid increasing the memory pressure by a long interval. Now the memory footprint is managed better and we always do a M_PURGE call before changing the interval. It's better to remove this legacy constraint.
---
Full diff: https://github.com/llvm/llvm-project/pull/89114.diff
1 Files Affected:
- (modified) compiler-rt/lib/scudo/standalone/wrappers_c.inc (-8)
``````````diff
diff --git a/compiler-rt/lib/scudo/standalone/wrappers_c.inc b/compiler-rt/lib/scudo/standalone/wrappers_c.inc
index 21d5b7add51275..28374548e39076 100644
--- a/compiler-rt/lib/scudo/standalone/wrappers_c.inc
+++ b/compiler-rt/lib/scudo/standalone/wrappers_c.inc
@@ -251,14 +251,6 @@ INTERFACE WEAK int SCUDO_PREFIX(mallopt)(int param, int value) {
// M_PURGE call so that we can minimize the impact of any unreleased pages
// introduced by interval transition.
SCUDO_ALLOCATOR.releaseToOS(scudo::ReleaseToOS::Force);
-
- if (value == 0) {
- // Will set the release values to their minimum values.
- value = INT32_MIN;
- } else {
- // Will set the release values to their maximum values.
- value = INT32_MAX;
- }
}
SCUDO_ALLOCATOR.setOption(scudo::Option::ReleaseInterval,
``````````
</details>
https://github.com/llvm/llvm-project/pull/89114
More information about the llvm-commits
mailing list