summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--browser/app/macbuild/Contents/Info.plist.in5
-rw-r--r--memory/build/replace_malloc.c6
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);