commit | b32a54d5896276f5f7be79e120e410e1e2537c63 | [log] [tgz] |
---|---|---|
author | erikchen <erikchen@chromium.org> | Fri Jul 13 23:01:46 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Jul 13 23:01:46 2018 |
tree | 94fb0308218c027e2ce48986af34d1c7ded6d925 | |
parent | 1a04c54775785722015c461ea75802797a330b79 [diff] |
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-Commit-Position: refs/heads/master@{#575108}
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 .