1. 31 Jan, 2011 1 commit
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=53352 · 646165c0
      barraclough@apple.com authored
      Heavy external fragmentation in FixedVMPoolAllocator can lead to a CRASH().
      
      Reviewed by Geoff Garen.
      
      The FixedVMPoolAllocator currently uses a best fix policy -
      switch to first fit, this is less prone to external fragmentation.
      
      * jit/ExecutableAllocatorFixedVMPool.cpp:
      (JSC::AllocationTableSizeClass::AllocationTableSizeClass):
      (JSC::AllocationTableSizeClass::blockSize):
      (JSC::AllocationTableSizeClass::blockCount):
      (JSC::AllocationTableSizeClass::blockAlignment):
      (JSC::AllocationTableSizeClass::size):
      (JSC::AllocationTableLeaf::AllocationTableLeaf):
      (JSC::AllocationTableLeaf::~AllocationTableLeaf):
      (JSC::AllocationTableLeaf::allocate):
      (JSC::AllocationTableLeaf::free):
      (JSC::AllocationTableLeaf::isEmpty):
      (JSC::AllocationTableLeaf::isFull):
      (JSC::AllocationTableLeaf::size):
      (JSC::AllocationTableLeaf::classForSize):
      (JSC::AllocationTableLeaf::dump):
      (JSC::LazyAllocationTable::LazyAllocationTable):
      (JSC::LazyAllocationTable::~LazyAllocationTable):
      (JSC::LazyAllocationTable::allocate):
      (JSC::LazyAllocationTable::free):
      (JSC::LazyAllocationTable::isEmpty):
      (JSC::LazyAllocationTable::isFull):
      (JSC::LazyAllocationTable::size):
      (JSC::LazyAllocationTable::dump):
      (JSC::LazyAllocationTable::classForSize):
      (JSC::AllocationTableDirectory::AllocationTableDirectory):
      (JSC::AllocationTableDirectory::~AllocationTableDirectory):
      (JSC::AllocationTableDirectory::allocate):
      (JSC::AllocationTableDirectory::free):
      (JSC::AllocationTableDirectory::isEmpty):
      (JSC::AllocationTableDirectory::isFull):
      (JSC::AllocationTableDirectory::size):
      (JSC::AllocationTableDirectory::classForSize):
      (JSC::AllocationTableDirectory::dump):
      (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
      (JSC::FixedVMPoolAllocator::alloc):
      (JSC::FixedVMPoolAllocator::free):
      (JSC::FixedVMPoolAllocator::allocated):
      (JSC::FixedVMPoolAllocator::isValid):
      (JSC::FixedVMPoolAllocator::classForSize):
      (JSC::FixedVMPoolAllocator::offsetToPointer):
      (JSC::FixedVMPoolAllocator::pointerToOffset):
      (JSC::ExecutableAllocator::committedByteCount):
      (JSC::ExecutableAllocator::isValid):
      (JSC::ExecutableAllocator::underMemoryPressure):
      (JSC::ExecutablePool::systemAlloc):
      (JSC::ExecutablePool::systemRelease):
      * wtf/PageReservation.h:
      (WTF::PageReservation::PageReservation):
      (WTF::PageReservation::commit):
      (WTF::PageReservation::decommit):
      (WTF::PageReservation::committed):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      646165c0
  2. 30 Jan, 2011 1 commit
    • ossy@webkit.org's avatar
      Unreviewed, rolling out r77025. · c80464ba
      ossy@webkit.org authored
      http://trac.webkit.org/changeset/77025
      https://bugs.webkit.org/show_bug.cgi?id=53401
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-01-30
      It made js1_5/Regress/regress-159334.js fail on 64 bit Linux
      (Requested by Ossy on #webkit).
      
      * jit/ExecutableAllocatorFixedVMPool.cpp:
      (JSC::FreeListEntry::FreeListEntry):
      (JSC::AVLTreeAbstractorForFreeList::get_less):
      (JSC::AVLTreeAbstractorForFreeList::set_less):
      (JSC::AVLTreeAbstractorForFreeList::get_greater):
      (JSC::AVLTreeAbstractorForFreeList::set_greater):
      (JSC::AVLTreeAbstractorForFreeList::get_balance_factor):
      (JSC::AVLTreeAbstractorForFreeList::set_balance_factor):
      (JSC::AVLTreeAbstractorForFreeList::null):
      (JSC::AVLTreeAbstractorForFreeList::compare_key_key):
      (JSC::AVLTreeAbstractorForFreeList::compare_key_node):
      (JSC::AVLTreeAbstractorForFreeList::compare_node_node):
      (JSC::reverseSortFreeListEntriesByPointer):
      (JSC::reverseSortCommonSizedAllocations):
      (JSC::FixedVMPoolAllocator::release):
      (JSC::FixedVMPoolAllocator::reuse):
      (JSC::FixedVMPoolAllocator::addToFreeList):
      (JSC::FixedVMPoolAllocator::coalesceFreeSpace):
      (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
      (JSC::FixedVMPoolAllocator::alloc):
      (JSC::FixedVMPoolAllocator::free):
      (JSC::FixedVMPoolAllocator::isValid):
      (JSC::FixedVMPoolAllocator::allocInternal):
      (JSC::FixedVMPoolAllocator::isWithinVMPool):
      (JSC::FixedVMPoolAllocator::addToCommittedByteCount):
      (JSC::ExecutableAllocator::committedByteCount):
      (JSC::maybeModifyVMPoolSize):
      (JSC::ExecutableAllocator::isValid):
      (JSC::ExecutableAllocator::underMemoryPressure):
      (JSC::ExecutablePool::systemAlloc):
      (JSC::ExecutablePool::systemRelease):
      * wtf/PageReservation.h:
      (WTF::PageReservation::PageReservation):
      (WTF::PageReservation::commit):
      (WTF::PageReservation::decommit):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c80464ba
  3. 28 Jan, 2011 1 commit
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=53352 · 85c4e205
      barraclough@apple.com authored
      Heavy external fragmentation in FixedVMPoolAllocator can lead to a CRASH().
      
      Reviewed by Geoff Garen.
      
      The FixedVMPoolAllocator currently uses a best fix policy -
      switch to first fit, this is less prone to external fragmentation.
      
      * jit/ExecutableAllocatorFixedVMPool.cpp:
      (JSC::AllocationTableSizeClass::AllocationTableSizeClass):
      (JSC::AllocationTableSizeClass::blockSize):
      (JSC::AllocationTableSizeClass::blockCount):
      (JSC::AllocationTableSizeClass::blockAlignment):
      (JSC::AllocationTableSizeClass::size):
      (JSC::AllocationTableLeaf::AllocationTableLeaf):
      (JSC::AllocationTableLeaf::~AllocationTableLeaf):
      (JSC::AllocationTableLeaf::allocate):
      (JSC::AllocationTableLeaf::free):
      (JSC::AllocationTableLeaf::isEmpty):
      (JSC::AllocationTableLeaf::isFull):
      (JSC::AllocationTableLeaf::size):
      (JSC::AllocationTableLeaf::classForSize):
      (JSC::AllocationTableLeaf::dump):
      (JSC::LazyAllocationTable::LazyAllocationTable):
      (JSC::LazyAllocationTable::~LazyAllocationTable):
      (JSC::LazyAllocationTable::allocate):
      (JSC::LazyAllocationTable::free):
      (JSC::LazyAllocationTable::isEmpty):
      (JSC::LazyAllocationTable::isFull):
      (JSC::LazyAllocationTable::size):
      (JSC::LazyAllocationTable::dump):
      (JSC::LazyAllocationTable::classForSize):
      (JSC::AllocationTableDirectory::AllocationTableDirectory):
      (JSC::AllocationTableDirectory::~AllocationTableDirectory):
      (JSC::AllocationTableDirectory::allocate):
      (JSC::AllocationTableDirectory::free):
      (JSC::AllocationTableDirectory::isEmpty):
      (JSC::AllocationTableDirectory::isFull):
      (JSC::AllocationTableDirectory::size):
      (JSC::AllocationTableDirectory::classForSize):
      (JSC::AllocationTableDirectory::dump):
      (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
      (JSC::FixedVMPoolAllocator::alloc):
      (JSC::FixedVMPoolAllocator::free):
      (JSC::FixedVMPoolAllocator::allocated):
      (JSC::FixedVMPoolAllocator::isValid):
      (JSC::FixedVMPoolAllocator::classForSize):
      (JSC::FixedVMPoolAllocator::offsetToPointer):
      (JSC::FixedVMPoolAllocator::pointerToOffset):
      (JSC::ExecutableAllocator::committedByteCount):
      (JSC::ExecutableAllocator::isValid):
      (JSC::ExecutableAllocator::underMemoryPressure):
      (JSC::ExecutablePool::systemAlloc):
      (JSC::ExecutablePool::systemRelease):
      * wtf/PageReservation.h:
      (WTF::PageReservation::PageReservation):
      (WTF::PageReservation::commit):
      (WTF::PageReservation::decommit):
      (WTF::PageReservation::committed):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      85c4e205
  4. 21 Jan, 2011 1 commit
  5. 01 Jan, 2011 1 commit
    • abarth@webkit.org's avatar
      Move JavaScriptCore to Source · 76da8fc1
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=51604
      
      Reviewed by Eric Seidel.
      
      Update references to JavaScriptCore to point to the new location.
      
      * Android.mk:
      * CMakeLists.txt:
      * DerivedSources.pro:
      * GNUmakefile.am:
      * Makefile:
      * WebKit.pri:
      * WebKit.pro:
      * wscript:
      
      Tools: 
      
      Update references to JavaScriptCore to point to the new location.
      
      * BuildSlaveSupport/build.webkit.org-config/master.cfg:
      * DumpRenderTree/qt/DumpRenderTree.pro:
      * DumpRenderTree/qt/ImageDiff.pro:
      * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
      * DumpRenderTree/wscript:
      * Scripts/build-jsc:
      * Scripts/build-webkit:
      * Scripts/do-file-rename:
      * Scripts/do-webcore-rename:
      * Scripts/run-javascriptcore-tests:
      * Scripts/update-javascriptcore-test-results:
      * Scripts/webkitdirs.pm:
      * Scripts/webkitpy/common/config/build_unittest.py:
      * Scripts/webkitpy/style/checker.py:
      * Scripts/webkitpy/style/checker_unittest.py:
      * Scripts/webkitpy/style/checkers/cpp_unittest.py:
      * WebKitTestRunner/InjectedBundle/qt/InjectedBundle.pro:
      * WebKitTestRunner/qt/WebKitTestRunner.pro:
      * wx/build/settings.py:
      
      WebCore: 
      
      Update references to JavaScriptCore.
      
      * Android.derived.jscbindings.mk:
      * Android.v8bindings.mk:
      * CMakeLists.txt:
      * WebCore.gyp/WebCore.gyp:
      * WebCore.pro:
        - These changes are subtle and might not be 100% correct.
      * move-js-headers.sh:
      
      WebKit/chromium: 
      
      * WebKit.gyp:
        - Point to JavaScriptCore in its new location.
      
      WebKit/gtk: 
      
      * GNUmakefile.am:
      * docs/GNUmakefile.am:
        - Point to JavaScriptCore in its new location.
      
      WebKit/qt: 
      
      * WebKit_pch.h:
      * docs/qtwebkit.qdocconf:
        - Point to JavaScriptCore in its new location.
      
      WebKit/win: 
      
      * WebKit.vcproj/WebKit.sln:
        - Point to JavaScriptCore in its new location.
      
      WebKit/wx: 
      
      * bindings/python/wscript:
      * wscript:
        - Point to JavaScriptCore in its new location.
      
      WebKit2: 
      
      * WebKit2.pro:
        - Point to JavaScriptCore in its new location.
      
      Websites/bugs.webkit.org: 
      
      * PrettyPatch/PrettyPatch.rb:
        - Remove reference to JavaScriptCore as a source directory.
      
      Websites/webkit.org: 
      
      * coding/assertion-guidelines.html:
        - Update documentation to point to the new location of
          JavaScriptCore.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      76da8fc1
  6. 21 Dec, 2010 1 commit
    • barraclough@apple.com's avatar
      JavaScriptCore: Added PageAllocationAligned, a cross-platform abstraction for... · 84f857f3
      barraclough@apple.com authored
      JavaScriptCore: Added PageAllocationAligned, a cross-platform abstraction for memory allocations with arbitrary alignment requirements
      https://bugs.webkit.org/show_bug.cgi?id=51359
              
      Patch by Geoffrey Garen <ggaren@apple.com> on 2010-12-21
      Reviewed by Gavin Barraclough & Oliver Hunt.
      
      I think this patch fixes <rdar://problem/8107952> [5.0.1] WER crash in
      Heap::allocateBlock (1902752929), and some other leaks and crashes as well.
      
      * Android.mk:
      * CMakeLists.txt:
      * GNUmakefile.am:
      * JavaScriptCore.gypi:
      * JavaScriptCore.vcproj/WTF/WTF.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj: Updated build files.
      
      * runtime/AlignedMemoryAllocator.h: Removed. Supplanted by
      PageAllocationAligned.
      
      * runtime/Collector.cpp:
      (JSC::Heap::destroy):
      (JSC::Heap::allocateBlock):
      (JSC::Heap::freeBlock):
      (JSC::Heap::addWeakGCHandle):
      * runtime/Collector.h: Switched from AlignedMemoryAllocator to
      PageAllocationAligned.
      
      * runtime/GCHandle.cpp:
      * runtime/GCHandle.h: Ditto.
      
      * wtf/PageAllocation.h:
      (WTF::PageAllocation::PageAllocation): Removed aligned memory allocation
      functions. Supplanted by PageAllocationAligned.
      
      * wtf/PageAllocationAligned.cpp: Added.
      (WTF::PageAllocationAligned::allocate):
      (WTF::PageAllocationAligned::deallocate):
      * wtf/PageAllocationAligned.h: Added.
      (WTF::PageAllocationAligned::PageAllocationAligned): New cross-platform
      class for doing aligned memory allocation. This class properly matches
      allocation and deallocation library calls, fixing a long-standing bug
      in PageAllocation.
      
      * wtf/Platform.h: Removed some defunction VM platform defines.
      
      * wtf/wtf.pri: Updated build files.
      
      JavaScriptGlue: Added PageAllocationAligned, a cross-platform abstraction for memory allocations with arbitrary alignment requirements
      https://bugs.webkit.org/show_bug.cgi?id=51359
      
      Patch by Geoffrey Garen <ggaren@apple.com> on 2010-12-21
      Reviewed by Gavin Barraclough & Oliver Hunt.
      
      * ForwardingHeaders/wtf/PageAllocationAligned.h: Added.
      
      WebCore: Added PageAllocationAligned, a cross-platform abstraction for memory allocations with arbitrary alignment requirements
      https://bugs.webkit.org/show_bug.cgi?id=51359
      
      Patch by Geoffrey Garen <ggaren@apple.com> on 2010-12-21
      Reviewed by Gavin Barraclough & Oliver Hunt.
      
      * ForwardingHeaders/wtf/PageAllocationAligned.h: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74431 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      84f857f3
  7. 20 Dec, 2010 2 commits
    • slewis@apple.com's avatar
      Committing for Gavin since he needed to leave. · e2249cfe
      slewis@apple.com authored
      PPC build fix; stop using std::swap on PageAllocation/PageReservation,
      this was failing on some compilers since the lack of default construction
      for the m_executable/m_writable fields meant the value being swapped may
      not have been fully initialized.
      
      Patch by Gavin Barraclough <barraclough@apple.com> on 2010-12-20
      * wtf/PageAllocation.h:
      (WTF::PageAllocation::deallocate):
      * wtf/PageBlock.h:
      * wtf/PageReservation.h:
      (WTF::PageReservation::deallocate):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74382 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e2249cfe
    • ggaren@apple.com's avatar
      2010-12-17 Geoffrey Garen <ggaren@apple.com> · 18a081c2
      ggaren@apple.com authored
              Reviewed by Sam Weinig.
      
              Factored common page set management into a new PageBlock base class
              https://bugs.webkit.org/show_bug.cgi?id=51285
      
              * Android.mk:
              * CMakeLists.txt:
              * GNUmakefile.am:
              * JavaScriptCore.gypi:
              * JavaScriptCore.vcproj/WTF/WTF.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * interpreter/RegisterFile.h:
              (JSC::RegisterFile::RegisterFile):
              * jit/ExecutableAllocator.cpp:
              (JSC::ExecutableAllocator::intializePageSize):
              * wtf/PageAllocation.cpp: Removed.
              * wtf/PageAllocation.h:
              (WTF::PageAllocation::deallocate):
              (WTF::PageAllocation::PageAllocation):
              * wtf/PageReservation.h:
              (WTF::PageReservation::commit):
              (WTF::PageReservation::decommit):
              (WTF::PageReservation::deallocate):
              (WTF::PageReservation::PageReservation):
              * wtf/wtf.pri:
      2010-12-20  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Sam Weinig.
      
              Factored common page set management into a new PageBlock base class
              https://bugs.webkit.org/show_bug.cgi?id=51285
      
              * ForwardingHeaders/wtf/PageBlock.h: Added.
      2010-12-20  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Sam Weinig.
      
              Factored common page set management into a new PageBlock base class
              https://bugs.webkit.org/show_bug.cgi?id=51285
      
              * ForwardingHeaders/wtf/PageBlock.h: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74357 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      18a081c2
  8. 17 Dec, 2010 1 commit
  9. 08 Dec, 2010 1 commit
    • ggaren@apple.com's avatar
      Migrated OS-specific allocation code from PageReservation and PageAllocation to OSAllocator · 05fad660
      ggaren@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=50653
      
      Reviewed by Sam Weinig.
      
      * JavaScriptCore.exp: Updated for new function signature.
      
      * interpreter/RegisterFile.h:
      (JSC::RegisterFile::RegisterFile):
      (JSC::RegisterFile::grow):
      * jit/ExecutableAllocatorFixedVMPool.cpp:
      (JSC::FixedVMPoolAllocator::reuse):
      (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): Removed checkAllocatedOkay.
      OSAllocator is now the central location for verifying that allocation succeeds.
      This allowed me to remove some complicating cross-platform cruft.
      
      * runtime/AlignedMemoryAllocator.h:
      (JSC::::allocate): Updated for code motion.
      
      * wtf/OSAllocator.h: Added Usage, writable, and executable parameters, to
      support VM features required by clients of PageAllocation and PageReservation.
      
      * wtf/OSAllocatorPosix.cpp:
      (WTF::OSAllocator::reserve):
      (WTF::OSAllocator::reserveAndCommit):
      (WTF::OSAllocator::commit): Moved PageAllocation support for randomizing
      executable memory here.
      
      * wtf/OSAllocatorSymbian.cpp:
      (WTF::OSAllocator::reserve):
      (WTF::OSAllocator::reserveAndCommit):
      (WTF::OSAllocator::commit): Updated for new function signatures.
      
      * wtf/OSAllocatorWin.cpp:
      (WTF::protection):
      (WTF::OSAllocator::reserve):
      (WTF::OSAllocator::reserveAndCommit):
      (WTF::OSAllocator::commit):
      (WTF::OSAllocator::release): Updated for new function signatures. Moved
      some protection-related and WINCE-related code from PageAllocation here.
      
      * wtf/PageAllocation.cpp: Nixed cross-platform lastError abstraction, since
      it was only used by checkAllocatedOkay, which is now gone.
      
      * wtf/PageAllocation.h:
      (WTF::PageAllocation::allocate):
      (WTF::PageAllocation::allocateAligned):
      (WTF::PageAllocation::deallocate):
      (WTF::PageAllocation::isPowerOfTwo):
      (WTF::PageAllocation::systemAllocateAligned): Removed system* functions,
      and replaced calls to them with calls to OSAllocator.
      
      * wtf/PageReservation.h:
      (WTF::PageReservation::commit):
      (WTF::PageReservation::decommit):
      (WTF::PageReservation::reserve):
      (WTF::PageReservation::deallocate):
      (WTF::PageReservation::PageReservation): Ditto. Added m_writable and
      m_executable because these flags are now required when committing memory.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      05fad660
  10. 06 Dec, 2010 1 commit
    • ggaren@apple.com's avatar
      2010-12-06 Geoffrey Garen <ggaren@apple.com> · 36d5236d
      ggaren@apple.com authored
              Reviewed by Gavin Barraclough.
      
              Simplified some ASLR-related code in PageAllocation/Reservation
              https://bugs.webkit.org/show_bug.cgi?id=50599
              
              Removed reserveAt, allocateAt, and friends, since they all existed to
              serve one feature: ASLR for executable memory on x86_64 on Mac. Moved
              ASLR code down into systemAllocate -- now, any time you allocate
              executable memory on a supporting platform, the memory's location is
              randomized.
      
              * jit/ExecutableAllocatorFixedVMPool.cpp:
              (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): No need for the caller
              to randomize anything.
      
              * wtf/PageAllocation.h:
              (WTF::PageAllocation::systemAllocate): Removed some *At() functions, and
              beefed up executable allocation with randomization.
      
              * wtf/PageReservation.h:
              (WTF::PageReservation::systemReserve): Removed some *At() functions.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73417 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      36d5236d
  11. 24 Aug, 2010 1 commit
  12. 05 Aug, 2010 1 commit
    • barraclough@apple.com's avatar
      Bug 43185 - Switch RegisterFile over to use PageAllocation · 792303e1
      barraclough@apple.com authored
      Reviewed by Sam Weinig.
      
      Remove platform-specific memory allocation code.
      
      * interpreter/RegisterFile.cpp:
      (JSC::RegisterFile::~RegisterFile):
      (JSC::RegisterFile::releaseExcessCapacity):
      * interpreter/RegisterFile.h:
      (JSC::RegisterFile::RegisterFile):
      (JSC::RegisterFile::grow):
      (JSC::RegisterFile::checkAllocatedOkay):
      * wtf/PageAllocation.cpp:
      (WTF::PageAllocation::lastError):
      * wtf/PageAllocation.h:
      (WTF::PageAllocation::allocate):
      (WTF::PageAllocation::allocateAt):
      (WTF::PageAllocation::allocateAligned):
      (WTF::PageAllocation::pageSize):
      (WTF::PageAllocation::isPageAligned):
      (WTF::PageAllocation::isPowerOfTwo):
      * wtf/PageReservation.h:
      (WTF::PageReservation::commit):
      (WTF::PageReservation::decommit):
      (WTF::PageReservation::reserve):
      (WTF::PageReservation::reserveAt):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64782 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      792303e1
  13. 04 Aug, 2010 3 commits
    • barraclough@apple.com's avatar
      Windows build fix part II. · fae7afcd
      barraclough@apple.com authored
      * wtf/PageReservation.h:
      (WTF::PageReservation::systemReserve):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64703 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fae7afcd
    • barraclough@apple.com's avatar
      Windows build fix. · 97c90196
      barraclough@apple.com authored
      * wtf/PageReservation.h:
      (WTF::PageReservation::systemReserve):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      97c90196
    • barraclough@apple.com's avatar
      JavaScriptCore: Bug 43515 - Fix small design issues with PageAllocation, split out PageReservation. · 70c0cc92
      barraclough@apple.com authored
      Reviewed by Sam Weinig.
      
      The PageAllocation class has a number of issues:
      * Changes in bug #43269 accidentally switched SYMBIAN over to use malloc/free to allocate
        blocks of memory for the GC heap, instead of allocating RChunks.  Revert this change in
        behaviour.
      * In order for PageAllocation to work correctly on WinCE we should be decommitting memory
        before deallocating.  In order to simplify understanding the expected state at deallocate,
        split behaviour out into PageAllocation and PageReservation classes.  Require that all
        memory be decommitted before calling deallocate on a PageReservation, add asserts to
        enforce this.
      * add many missing asserts.
      * inline more functions.
      * remove ability to create sub-PageAllocations from an existing PageAllocations object -
        this presented an interface that would allow sub regions to be deallocated, which would
        not have provided expected behaviour.
      * remove writable/executable arguments to commit, this value can be cached at the point
        the memory is reserved.
      * remove writable/executable arguments to allocateAligned, protection other than RW is not
        supported.
      * add missing checks for overflow & failed allocation to mmap path through allocateAligned.
      
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * jit/ExecutableAllocator.cpp:
      (JSC::ExecutableAllocator::intializePageSize):
      * jit/ExecutableAllocator.h:
      (JSC::ExecutablePool::Allocation::Allocation):
      (JSC::ExecutablePool::Allocation::base):
      (JSC::ExecutablePool::Allocation::size):
      (JSC::ExecutablePool::Allocation::operator!):
      * jit/ExecutableAllocatorFixedVMPool.cpp:
      (JSC::FixedVMPoolAllocator::reuse):
      (JSC::FixedVMPoolAllocator::coalesceFreeSpace):
      (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
      (JSC::FixedVMPoolAllocator::alloc):
      (JSC::FixedVMPoolAllocator::free):
      (JSC::FixedVMPoolAllocator::allocInternal):
      * runtime/AlignedMemoryAllocator.h:
      (JSC::::allocate):
      (JSC::::AlignedMemoryAllocator):
      * runtime/Collector.cpp:
      (JSC::Heap::allocateBlock):
      * runtime/Collector.h:
      * wtf/PageAllocation.cpp:
      * wtf/PageAllocation.h:
      (WTF::PageAllocation::operator!):
      (WTF::PageAllocation::allocate):
      (WTF::PageAllocation::allocateAt):
      (WTF::PageAllocation::allocateAligned):
      (WTF::PageAllocation::deallocate):
      (WTF::PageAllocation::pageSize):
      (WTF::PageAllocation::systemAllocate):
      (WTF::PageAllocation::systemAllocateAt):
      (WTF::PageAllocation::systemAllocateAligned):
      (WTF::PageAllocation::systemDeallocate):
      (WTF::PageAllocation::systemPageSize):
      * wtf/PageReservation.h: Copied from JavaScriptCore/wtf/PageAllocation.h.
      (WTF::PageReservation::PageReservation):
      (WTF::PageReservation::commit):
      (WTF::PageReservation::decommit):
      (WTF::PageReservation::reserve):
      (WTF::PageReservation::reserveAt):
      (WTF::PageReservation::deallocate):
      (WTF::PageReservation::systemCommit):
      (WTF::PageReservation::systemDecommit):
      (WTF::PageReservation::systemReserve):
      (WTF::PageReservation::systemReserveAt):
      * wtf/Platform.h:
      
      JavaScriptGlue: Bug 43515 - Fix small design issues with PageAllocation, split out PageReservation.
      (add forwarding headers)
      
      Reviewed by Sam Weinig.
      
      * ForwardingHeaders/wtf/Bitmap.h: Added.
      * ForwardingHeaders/wtf/PageReservation.h: Added.
      
      WebCore: Bug 43515 - Fix small design issues with PageAllocation, split out PageReservation.
      (add forwarding headers)
      
      Reviewed by Sam Weinig.
      
      * ForwardingHeaders/wtf/Bitmap.h: Added.
      * ForwardingHeaders/wtf/PageReservation.h: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      70c0cc92