diff options
author | Mike Hommey <mh+mozilla@glandium.org> | 2018-01-31 17:18:01 +0900 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-03-14 10:56:20 +0100 |
commit | f56791f643f8fa547805d99ec938b135d665a9c6 (patch) | |
tree | 243c8ed3a8875a7a4c8013f4be1e095374105917 | |
parent | d9ef671b04f43a30f3fcd2db4e351a3cbd811f68 (diff) | |
download | UXP-f56791f643f8fa547805d99ec938b135d665a9c6.tar UXP-f56791f643f8fa547805d99ec938b135d665a9c6.tar.gz UXP-f56791f643f8fa547805d99ec938b135d665a9c6.tar.lz UXP-f56791f643f8fa547805d99ec938b135d665a9c6.tar.xz UXP-f56791f643f8fa547805d99ec938b135d665a9c6.zip |
Bug 1424709 - Force disable the OSX system "nano allocator". r=spohl, a=RyanVM
We're not actually using it, and it messes up with the zone allocator in
mozjemalloc after fork(). See the lengthy analysis in
https://bugzilla.mozilla.org/show_bug.cgi?id=1424709#c34 and following.
--HG--
extra : rebase_source : b191048290a907cc7668ad7ab6369ef8661f31dc
extra : intermediate-source : 45c5d467a46077dcc3ccd59feafd0c2784432fef
extra : source : bf1efa161edb20a83fe8db2f96c51f4e66880153
-rw-r--r-- | browser/app/macbuild/Contents/Info.plist.in | 5 | ||||
-rw-r--r-- | memory/build/replace_malloc.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/browser/app/macbuild/Contents/Info.plist.in b/browser/app/macbuild/Contents/Info.plist.in index 6212e886d..d6902fffd 100644 --- a/browser/app/macbuild/Contents/Info.plist.in +++ b/browser/app/macbuild/Contents/Info.plist.in @@ -205,6 +205,11 @@ <true/> <key>LSApplicationCategoryType</key> <string>public.app-category.productivity</string> + <key>LSEnvironment</key> + <dict> + <key>MallocNanoZone</key> + <string>0</string> + </dict> <key>LSFileQuarantineEnabled</key> <true/> <key>LSMinimumSystemVersion</key> diff --git a/memory/build/replace_malloc.c b/memory/build/replace_malloc.c index 88dfde33c..26dd8c2d6 100644 --- a/memory/build/replace_malloc.c +++ b/memory/build/replace_malloc.c @@ -513,6 +513,12 @@ register_zone(void) */ malloc_zone_t *purgeable_zone = malloc_default_purgeable_zone(); + // There is a problem related to the above with the system nano zone, which + // is hard to work around from here, and that is instead worked around by + // disabling the nano zone through an environment variable + // (MallocNanoZone=0). In Firefox, we do that through + // browser/app/macbuild/Contents/Info.plist.in. + /* Register the custom zone. At this point it won't be the default. */ malloc_zone_register(&zone); |