• mhahnenberg@apple.com's avatar
    Regions should be allocated from the same contiguous segment of virtual memory · 944b1216
    mhahnenberg@apple.com authored
    Reviewed by Filip Pizlo.
    Instead of letting the OS spread our Regions all over the place, we should allocate them all within 
    some range of each other. This change will open the door to some other optimizations, e.g. doing simple 
    range checks for our write barriers and compressing JSCell pointers to 32-bits.
    Added new SuperRegion class that encapsulates allocating Regions from a contiguous reserved chunk of 
    virtual address space. It functions very similarly to the FixedVMPoolExecutableAllocator class used by the JIT.
    Also added two new subclasses of Region, NormalRegion and ExcessRegion. 
    NormalRegion is the type of Region that is normally allocated when there is available space remaining 
    in the SuperRegion. If we ever run out of space in the SuperRegion, we fall back to allocating 
    ExcessRegions, which are identical to how Regions have behaved up until now, i.e. they contain a 
    We only use the SuperRegion (and NormalRegions) on 64-bit systems, since it doesn't make sense to reserve the 
    entire 4 GB address space on 32-bit systems just for the JS heap.
    * GNUmakefile.list.am:
    * JavaScriptCore.gypi:
    * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
    * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
    * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
    * JavaScriptCore.xcodeproj/project.pbxproj:
    * Target.pri:
    * heap/BlockAllocator.cpp:
    * heap/BlockAllocator.h:
    * heap/Heap.cpp:
    * heap/Heap.h:
    * heap/MarkedBlock.cpp:
    * heap/Region.h:
    * heap/SuperRegion.cpp: Added.
    * heap/SuperRegion.h: Added.
    * wtf/MetaAllocator.cpp: Changed the MetaAllocator to allow custom page sizes if the derived class wants to
    use something other than the system page size.
    * wtf/MetaAllocator.h:
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147324 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore.vcxproj 43.3 KB