[bmalloc] NSBundle-based application name check should be executed after debug-heap...
authorysuzuki@apple.com <ysuzuki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Feb 2019 09:09:57 +0000 (09:09 +0000)
committerysuzuki@apple.com <ysuzuki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Feb 2019 09:09:57 +0000 (09:09 +0000)
commitb657c69a6e27d0dba3b2b2a068dee1e3900be5a2
treeb96dc61c25000b3ed2a5fae3b2946f5520e70783
parent7de49dc296ecdc6dcc978acba24f7ab61c4cffc6
[bmalloc] NSBundle-based application name check should be executed after debug-heap environment variable check
https://bugs.webkit.org/show_bug.cgi?id=194694

Reviewed by Mark Lam.

Interestingly, NSBundle allocates fair amount of memory and keeps it for a process-long time. For example, it
allocates global NSConcreteHashTable, which takes 2.5KB. This patch changes the order of gigacage-check, we
first check "Malloc=1" status, and then check the process name through NSBundle. This allows us to remove NSBundle
related allocation in JSC initialization in the system malloc mode.

* bmalloc/Gigacage.cpp:
(Gigacage::shouldBeEnabled):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241581 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/bmalloc/ChangeLog
Source/bmalloc/bmalloc/Gigacage.cpp