Factored threaded block allocation into a separate object
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 29 Apr 2012 01:44:37 +0000 (01:44 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 29 Apr 2012 01:44:37 +0000 (01:44 +0000)
commit35246815d89179e3f7b5deb601698f8ed9166117
treef612d850f8b7eda0b78edd54848411ac8c1fe7be
parentb4624bcf74c72dab8ea4e77b146c1fdef9c52fc5
Factored threaded block allocation into a separate object
https://bugs.webkit.org/show_bug.cgi?id=85148

Reviewed by Sam Weinig.

99% of this patch just moves duplicated block allocation and
deallocation code into a new object named BlockAllocator, with these
exceptions:

* heap/BlockAllocator.h: Added.
(BlockAllocator::BlockAllocator): The order of declarations here now
guards us against an unlikely race condition during startup.

* heap/BlockAllocator.cpp:
JSC::BlockAllocator::blockFreeingThreadMain): Added a FIXME to
highlight a lack of clarity we have in our block deallocation routines.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115590 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/GNUmakefile.list.am
Source/JavaScriptCore/JavaScriptCore.gypi
Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/Target.pri
Source/JavaScriptCore/heap/BlockAllocator.cpp [new file with mode: 0644]
Source/JavaScriptCore/heap/BlockAllocator.h [new file with mode: 0644]
Source/JavaScriptCore/heap/CopiedSpace.cpp
Source/JavaScriptCore/heap/CopiedSpaceInlineMethods.h
Source/JavaScriptCore/heap/Heap.cpp
Source/JavaScriptCore/heap/Heap.h
Source/JavaScriptCore/heap/MarkedAllocator.cpp
Source/JavaScriptCore/heap/MarkedSpace.cpp