From 3e82e9b13867be1231c2dc8554980bbb6f93ef86 Mon Sep 17 00:00:00 2001 From: Chia-hung Duan Date: Wed, 17 Apr 2024 11:05:33 -0700 Subject: [scudo] Change the default MinReleaseToOsIntervalMs to -1 The page releasing has been greatly improved and the memory grouping avoids growing memory footprint too fast. Besides, every release interval change will introduce a M_PURGE call which ensure the memory usage won't be impacted by the different release interval. It's safe to release the interval constraint. Test: builds Change-Id: I0cbf553bc372bd3fe0e3ce795a29e2380e2f8574 --- config/custom_scudo_config.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/custom_scudo_config.h b/config/custom_scudo_config.h index 5e85d0fe1a7..26f590e3c25 100644 --- a/config/custom_scudo_config.h +++ b/config/custom_scudo_config.h @@ -107,8 +107,9 @@ struct AndroidNormalConfig { static const uptr GroupSizeLog = 18U; typedef uptr CompactPtrT; #endif - static const s32 MinReleaseToOsIntervalMs = 1000; + static const s32 MinReleaseToOsIntervalMs = -1; static const s32 MaxReleaseToOsIntervalMs = 1000; + static const s32 DefaultReleaseToOsIntervalMs = 1000; }; #if SCUDO_CAN_USE_PRIMARY64 template using PrimaryT = SizeClassAllocator64; @@ -122,8 +123,9 @@ struct AndroidNormalConfig { static const u32 QuarantineSize = 32U; static const u32 DefaultMaxEntriesCount = 32U; static const uptr DefaultMaxEntrySize = 2UL << 20; - static const s32 MinReleaseToOsIntervalMs = 0; + static const s32 MinReleaseToOsIntervalMs = -1; static const s32 MaxReleaseToOsIntervalMs = 1000; + static const s32 DefaultReleaseToOsIntervalMs = 0; }; template using CacheT = MapAllocatorCache; }; -- cgit v1.2.3