Title: [233347] trunk/Source/bmalloc
Revision
233347
Author
msab...@apple.com
Date
2018-06-28 18:40:26 -0700 (Thu, 28 Jun 2018)

Log Message

Disable IsoHeaps when Gigacage is off
https://bugs.webkit.org/show_bug.cgi?id=187160

Reviewed by Saam Barati.

If Gigacage is disabled, it may be due to lack of address space.
Therefore we should also turn off IsoHeaps since it uses more virtual
address space as well.

* bmalloc/IsoTLS.cpp:
(bmalloc::IsoTLS::determineMallocFallbackState):

Modified Paths

Diff

Modified: trunk/Source/bmalloc/ChangeLog (233346 => 233347)


--- trunk/Source/bmalloc/ChangeLog	2018-06-29 01:37:38 UTC (rev 233346)
+++ trunk/Source/bmalloc/ChangeLog	2018-06-29 01:40:26 UTC (rev 233347)
@@ -1,3 +1,17 @@
+2018-06-28  Michael Saboff  <msab...@apple.com>
+
+        Disable IsoHeaps when Gigacage is off
+        https://bugs.webkit.org/show_bug.cgi?id=187160
+
+        Reviewed by Saam Barati.
+
+        If Gigacage is disabled, it may be due to lack of address space.
+        Therefore we should also turn off IsoHeaps since it uses more virtual
+        address space as well.
+
+        * bmalloc/IsoTLS.cpp:
+        (bmalloc::IsoTLS::determineMallocFallbackState):
+
 2018-06-27  Simon Fraser  <simon.fra...@apple.com>
 
         https://hackernoon.com/ uses lots of layer backing store

Modified: trunk/Source/bmalloc/bmalloc/IsoTLS.cpp (233346 => 233347)


--- trunk/Source/bmalloc/bmalloc/IsoTLS.cpp	2018-06-29 01:37:38 UTC (rev 233346)
+++ trunk/Source/bmalloc/bmalloc/IsoTLS.cpp	2018-06-29 01:40:26 UTC (rev 233347)
@@ -27,6 +27,7 @@
 
 #include "DebugHeap.h"
 #include "Environment.h"
+#include "Gigacage.h"
 #include "IsoTLSEntryInlines.h"
 #include "IsoTLSInlines.h"
 #include "IsoTLSLayout.h"
@@ -201,12 +202,21 @@
         [] {
             if (s_mallocFallbackState != MallocFallbackState::Undecided)
                 return;
-            
+
+#if GIGACAGE_ENABLED
+            if (!Gigacage::shouldBeEnabled()) {
+                s_mallocFallbackState = MallocFallbackState::FallBackToMalloc;
+                return;
+            }
+
             const char* env = getenv("bmalloc_IsoHeap");
             if (env && (!strcasecmp(env, "false") || !strcasecmp(env, "no") || !strcmp(env, "0")))
                 s_mallocFallbackState = MallocFallbackState::FallBackToMalloc;
             else
                 s_mallocFallbackState = MallocFallbackState::DoNotFallBack;
+#else
+            s_mallocFallbackState = MallocFallbackState::FallBackToMalloc;
+#endif
         });
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to