Commit e483ecaa authored by Mike Hommey's avatar Mike Hommey
Browse files

Bug 1424709 - Force disable the OSX system "nano allocator". r=spohl

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 : c58e13b897dde7b32d83c43fbb2a04a0db3a5dc9
parent 1c25c7a3
...@@ -225,6 +225,11 @@ ...@@ -225,6 +225,11 @@
<true/> <true/>
<key>LSApplicationCategoryType</key> <key>LSApplicationCategoryType</key>
<string>public.app-category.productivity</string> <string>public.app-category.productivity</string>
<key>LSEnvironment</key>
<dict>
<key>MallocNanoZone</key>
<string>0</string>
</dict>
<key>LSFileQuarantineEnabled</key> <key>LSFileQuarantineEnabled</key>
<true/> <true/>
<key>LSMinimumSystemVersion</key> <key>LSMinimumSystemVersion</key>
......
...@@ -420,6 +420,12 @@ register_zone(void) ...@@ -420,6 +420,12 @@ register_zone(void)
// a scalable_zone. // a scalable_zone.
malloc_zone_t* purgeable_zone = malloc_default_purgeable_zone(); 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. // Register the custom zone. At this point it won't be the default.
malloc_zone_register(&zone); malloc_zone_register(&zone);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment