commit | 818d165fd2156f65e80ffd8306639a489f794392 | [log] [tgz] |
---|---|---|
author | erikchen <erikchen@chromium.org> | Mon Jul 16 17:49:43 2018 |
committer | Erik Chen <erikchen@chromium.org> | Mon Jul 16 17:49:43 2018 |
tree | f4a41dfee173623b91f814359b5b8b442d492b21 | |
parent | 5c623218df5e7fe189ad1ebc972e2e9966f210b2 [diff] |
[Merge to 3440] Add the LSEnvironment variable MallocNanoZone=0. There appears to be a bug in Launch Services that causes MallocNanoZone=1 to always be set by default for all applications [this affects applications launched by Finder, and on restart, but not applications launched from the Terminal]. I filed https://bugreport.apple.com/web/?problemID=42181038 to track this. MallocNanoZone causes libMalloc to use the nano malloc zone by default [affects allocations <= 256 bytes]. The implementation of nano malloc never frees memory. See https://bugs.chromium.org/p/chromium/issues/detail?id=861939#c6 for more details. This has been observed to cause > 1GB of wasted memory in the browser process. Possibly a lot more when added up across all processes. To test this: 1) Build Chrome with patch. 2) Run /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -f <path_to_chrome> 3) Launch Chrome from Finder 4) Use "vmmap <pid>" to observe whether there is a MALLOC_NANO summary. Bug: 861939 Change-Id: I740bcbb006e4ce641d0dde6f6e53dcf4f032ff0b Reviewed-on: https://chromium-review.googlesource.com/1137131 Reviewed-by: Avi Drissman <avi@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Erik Chen <erikchen@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#575108}(cherry picked from commit b32a54d5896276f5f7be79e120e410e1e2537c63) Reviewed-on: https://chromium-review.googlesource.com/1138294 Reviewed-by: Erik Chen <erikchen@chromium.org> Cr-Commit-Position: refs/branch-heads/3440@{#680} Cr-Branched-From: 010ddcfda246975d194964ccf20038ebbdec6084-refs/heads/master@{#561733}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .