Bug 43009 - Abstract out page allocation from executable allocators
authorGavin Barraclough <barraclough@apple.com>
Tue, 27 Jul 2010 05:02:09 +0000 (05:02 +0000)
committerSimon Hausmann <simon.hausmann@nokia.com>
Thu, 23 Sep 2010 19:04:10 +0000 (21:04 +0200)
commit888e0528a115948d1fc5a130a9619352835dd43f
tree2a321ed1d782601a392ee4cf659504740406ebfd
parenta74784aa5e1a80c6919d953848873dbdea0c307a
Bug 43009 - Abstract out page allocation from executable allocators

Reviewed by Oliver Hunt.

JavaScriptCore:

It would be great to have a single platform abstraction for block allocation, rather than copy/paste code.

In this initial implementation I've made Symbian fall back to use malloc/free for non-executable memory.
I think this will match current behaviour for the next client we will want to port across (RegisterFile &
Collector).

* CMakeListsEfl.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::intializePageSize):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
(JSC::ExecutableAllocator::isValid):
* jit/ExecutableAllocator.h:
(JSC::ExecutablePool::ExecutablePool):
(JSC::ExecutablePool::poolAllocate):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::release):
(JSC::FixedVMPoolAllocator::reuse):
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
(JSC::FixedVMPoolAllocator::alloc):
(JSC::FixedVMPoolAllocator::free):
(JSC::FixedVMPoolAllocator::isValid):
(JSC::FixedVMPoolAllocator::isWithinVMPool):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
* jit/ExecutableAllocatorPosix.cpp: Removed.
* jit/ExecutableAllocatorSymbian.cpp: Removed.
* jit/ExecutableAllocatorWin.cpp: Removed.
* wscript:
* wtf/PageAllocator.cpp: Added.
(WTF::protection):
(WTF::PageAllocation::commit):
(WTF::PageAllocation::decommit):
(WTF::PageAllocator::allocate):
(WTF::PageAllocator::reserve):
(WTF::PageAllocator::deallocate):
(WTF::PageAllocator::pagesize):
* wtf/PageAllocator.h: Added.
(WTF::PageAllocation::PageAllocation):
(WTF::PageAllocation::base):
(WTF::PageAllocation::size):
(WTF::PageAllocation::chunk):
(WTF::PageAllocation::operator!):
(WTF::PageAllocator::):

JavaScriptGlue:

* ForwardingHeaders/wtf/PageAllocation.h: Added.

WebCore:

* ForwardingHeaders/wtf/PageAllocation.h: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
JavaScriptCore/CMakeListsEfl.txt
JavaScriptCore/ChangeLog
JavaScriptCore/GNUmakefile.am
JavaScriptCore/JavaScriptCore.gypi
JavaScriptCore/JavaScriptCore.pro
JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
JavaScriptCore/jit/ExecutableAllocator.cpp
JavaScriptCore/jit/ExecutableAllocator.h
JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp
JavaScriptCore/jit/ExecutableAllocatorPosix.cpp [deleted file]
JavaScriptCore/jit/ExecutableAllocatorSymbian.cpp [deleted file]
JavaScriptCore/jit/ExecutableAllocatorWin.cpp [deleted file]
JavaScriptCore/wscript
JavaScriptCore/wtf/PageAllocation.cpp [new file with mode: 0644]
JavaScriptCore/wtf/PageAllocation.h [new file with mode: 0644]
JavaScriptGlue/ChangeLog
JavaScriptGlue/ForwardingHeaders/wtf/PageAllocation.h [new file with mode: 0644]
WebCore/ChangeLog
WebCore/ForwardingHeaders/wtf/PageAllocation.h [new file with mode: 0644]