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).
(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.