[compiler-rt] [scudo] Enable "Delayed release to OS" feature for Android (PR #65942)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 15 08:17:54 PDT 2023
andersdellien-arm wrote:
Hi,
Thanks for looking at this.
You are right that this only changes the behavior of the secondary allocator, the primary will still use 1000 ms. However, that change does make a difference as any freed memory blocks will retain their contents instead of being "over-mapped", i.e. we will do
```
Entry.MemMap.setMemoryPermission(Entry.CommitBase, Entry.CommitSize,
MAP_NOACCESS);
```
Instead of
```
mapSecondary<Config>(Options, Entry.CommitBase, Entry.CommitSize,
Entry.CommitBase, MAP_NOACCESS, Entry.MemMap);
```
This is not a general improvement, it only makes a difference for any application or benchmark that makes heavy use of the secondary allocator - e.g. the SQLite and PDF Rendering sub-tests in Geekbench.
All my tests have been stand-alone binaries run directly from the shell (mostly Geekbench) - if Android apps already override this option then I agree the impact will be smaller.
https://github.com/llvm/llvm-project/pull/65942
More information about the llvm-commits
mailing list