[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:11:39 PDT 2024
https://github.com/ChiaHungDuan created https://github.com/llvm/llvm-project/pull/89114
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.
>From a96c5cf07d20bc87c7425bf54885646faf10c73f Mon Sep 17 00:00:00 2001
From: Chia-hung Duan <chiahungduan at google.com>
Date: Wed, 17 Apr 2024 17:39:00 +0000
Subject: [PATCH] [scudo] Let allocator config limit the page releasing
interval
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.
---
compiler-rt/lib/scudo/standalone/wrappers_c.inc | 8 --------
1 file changed, 8 deletions(-)
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,
More information about the llvm-commits
mailing list