Disable IsoHeaps when Gigacage is off
authormsaboff@apple.com <msaboff@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Jul 2018 18:27:26 +0000 (18:27 +0000)
committermsaboff@apple.com <msaboff@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Jul 2018 18:27:26 +0000 (18:27 +0000)
commit007476b4865e64ae3924e865440eb7351e20bd3b
tree982308ecef0e4b327364b21e3b482b1ac08a8125
parentd423dc9230b37f955efd655b4d50c77f2ac6ec1f
Disable IsoHeaps when Gigacage is off
https://bugs.webkit.org/show_bug.cgi?id=187160

Reviewed by Saam Barati.

Relanding change sets 233547 and 233550 with the added fix that Gigacage is also
enabled for DumpRenderTree.

Updated determineMallocFallbackState to base enabling of Iso Heaps on Gigacage
being enabled.  We do this because if Gigacage is disabled, it may be due to lack
of address space.

To work around a compiler issue uncovered by the change above, I added explicit
instantiation of PerThread's static variables.  Defined the same explicit
instantiated static variables with export scope in the new file PerThread.cpp
to eliminate separate variables allocations in each linked framework / library.

* CMakeLists.txt:
* bmalloc.xcodeproj/project.pbxproj:
* bmalloc/IsoTLS.cpp:
(bmalloc::IsoTLS::determineMallocFallbackState):
* bmalloc/PerThread.cpp: Added.
* bmalloc/PerThread.h:
* bmalloc/ProcessCheck.mm:
(bmalloc::gigacageEnabledForProcess):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233773 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/bmalloc/CMakeLists.txt
Source/bmalloc/ChangeLog
Source/bmalloc/bmalloc.xcodeproj/project.pbxproj
Source/bmalloc/bmalloc/IsoTLS.cpp
Source/bmalloc/bmalloc/PerThread.cpp [new file with mode: 0644]
Source/bmalloc/bmalloc/PerThread.h
Source/bmalloc/bmalloc/ProcessCheck.mm