Isolated Heaps caused an increase in reported leaks on the bots
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Nov 2017 00:47:58 +0000 (00:47 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Nov 2017 00:47:58 +0000 (00:47 +0000)
commit809d822036afb070ecb0c01eacd7ca52d8d364d2
tree7fbfa3839659af6fffcb893c51f4a9b26f2d2f63
parent1b052d31272bb1cdf9a9c2e0a9e65fa23d00ccfa
Isolated Heaps caused an increase in reported leaks on the bots
https://bugs.webkit.org/show_bug.cgi?id=179463

Reviewed by Darin Adler.

This fixes the way isoheaps interact with system tools:

- Opts into the VMHeap API so that the leaks tool can find isoheap memory.

- Opts into the DebugHeap/Environment APIs so that we turn off isoheap allocation if memory
  debugging options are in use.

* bmalloc.xcodeproj/project.pbxproj:
* bmalloc/DebugHeap.h:
* bmalloc/IsoHeap.h:
* bmalloc/IsoPage.cpp: Added.
(bmalloc::IsoPageBase::allocatePageMemory):
* bmalloc/IsoPage.h:
* bmalloc/IsoPageInlines.h:
(bmalloc::IsoPage<Config>::tryCreate):
* bmalloc/IsoTLS.cpp:
(bmalloc::IsoTLS::deallocateSlow):
(bmalloc::IsoTLS::ensureEntries):
(bmalloc::IsoTLS::isUsingDebugHeap):
(bmalloc::IsoTLS::debugMalloc):
* bmalloc/IsoTLS.h:
* bmalloc/IsoTLSInlines.h:
(bmalloc::IsoTLS::allocate):
(bmalloc::IsoTLS::deallocate):
(bmalloc::IsoTLS::allocateImpl):
(bmalloc::IsoTLS::allocateFast):
(bmalloc::IsoTLS::allocateSlow):
(bmalloc::IsoTLS::deallocateImpl):
(bmalloc::IsoTLS::deallocateFast):
(bmalloc::IsoTLS::ensureHeapAndEntries):
(bmalloc::IsoTLS::allocator): Deleted.
(bmalloc::IsoTLS::deallocator): Deleted.
* bmalloc/bmalloc.cpp:
(bmalloc::api::tryLargeMemalignVirtual):
(bmalloc::api::freeLargeVirtual):
(bmalloc::api::scavenge):
(bmalloc::api::isEnabled):
(bmalloc::api::setScavengerThreadQOSClass):
* bmalloc/bmalloc.h:
(bmalloc::api::tryLargeMemalignVirtual): Deleted.
(bmalloc::api::freeLargeVirtual): Deleted.
(bmalloc::api::scavenge): Deleted.
(bmalloc::api::isEnabled): Deleted.
(bmalloc::api::setScavengerThreadQOSClass): Deleted.

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