[compiler-rt] [scudo] Reflect the allowed values for M_DECAY_TIME on Android (PR #89114)

Christopher Ferris via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 25 16:53:02 PDT 2024


================
@@ -252,13 +252,10 @@ INTERFACE WEAK int SCUDO_PREFIX(mallopt)(int param, int value) {
       // 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.
+      // The values allowed on Android are {-1, 0, 1}. "1" means the longest
+      // interval.
+      if (value == 1)
----------------
cferris1000 wrote:

Should this check be value > 0? That more closely matches what it did before.

https://github.com/llvm/llvm-project/pull/89114


More information about the llvm-commits mailing list