[all-commits] [llvm/llvm-project] c753a3: [scudo][standalone] Various improvements wrt RSS
Kostya Kortchinsky via All-commits
all-commits at lists.llvm.org
Wed Feb 26 12:26:40 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: c753a306fd1ad4a7e5c61367225abce86ac29cd7
https://github.com/llvm/llvm-project/commit/c753a306fd1ad4a7e5c61367225abce86ac29cd7
Author: Kostya Kortchinsky <kostyak at google.com>
Date: 2020-02-26 (Wed, 26 Feb 2020)
Changed paths:
M compiler-rt/lib/scudo/standalone/combined.h
M compiler-rt/lib/scudo/standalone/local_cache.h
M compiler-rt/lib/scudo/standalone/primary32.h
M compiler-rt/lib/scudo/standalone/primary64.h
M compiler-rt/lib/scudo/standalone/release.h
M compiler-rt/lib/scudo/standalone/secondary.h
M compiler-rt/lib/scudo/standalone/size_class_map.h
M compiler-rt/lib/scudo/standalone/tests/release_test.cpp
M compiler-rt/lib/scudo/standalone/tests/size_class_map_test.cpp
Log Message:
-----------
[scudo][standalone] Various improvements wrt RSS
Summary:
This patch includes several changes to reduce the overall footprint
of the allocator:
- for realloc'd chunks: only keep the same chunk when lowering the size
if the delta is within a page worth of bytes;
- when draining a cache: drain the beginning, not the end; we add pointers
at the end, so that meant we were draining the most recently added
pointers;
- change the release code to account for an freed up last page: when
scanning the pages, we were looking for pages fully covered by blocks;
in the event of the last page, if it's only partially covered, we
wouldn't mark it as releasable - even what follows the last chunk is
all 0s. So now mark the rest of the page as releasable, and adapt the
test;
- add a missing `setReleaseToOsIntervalMs` to the cacheless secondary;
- adjust the Android classes based on more captures thanks to pcc@'s
tool.
Reviewers: pcc, cferris, hctim, eugenis
Subscribers: #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D75142
More information about the All-commits
mailing list