[PATCH] D74582: [scudo][standalone] Always release secondary allocs on Android
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 13 15:45:35 PST 2020
cryptoad created this revision.
Herald added projects: Sanitizers, LLVM.
Herald added subscribers: llvm-commits, Sanitizers.
We still have some outliers in terms of RSS/PSS, and since jemalloc is
configured to attempt release all the time, mimic this for the
Secondary.
We still have to be able to configure that properly via `mallopt`,
which comes next.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D74582
Files:
compiler-rt/lib/scudo/standalone/combined.h
Index: compiler-rt/lib/scudo/standalone/combined.h
===================================================================
--- compiler-rt/lib/scudo/standalone/combined.h
+++ compiler-rt/lib/scudo/standalone/combined.h
@@ -145,7 +145,9 @@
Stats.initLinkerInitialized();
const s32 ReleaseToOsIntervalMs = getFlags()->release_to_os_interval_ms;
Primary.initLinkerInitialized(ReleaseToOsIntervalMs);
- Secondary.initLinkerInitialized(&Stats, ReleaseToOsIntervalMs);
+ // FIXME(kostyak): for now, always release Secondary allocations on Android.
+ Secondary.initLinkerInitialized(&Stats,
+ SCUDO_ANDROID ? 0 : ReleaseToOsIntervalMs);
Quarantine.init(
static_cast<uptr>(getFlags()->quarantine_size_kb << 10),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74582.244543.patch
Type: text/x-patch
Size: 775 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200213/c6921569/attachment.bin>
More information about the llvm-commits
mailing list