Ignore:
Timestamp:
Apr 20, 2009, 11:12:39 AM (16 years ago)
Author:
[email protected]
Message:

2009-04-20 Sam Weinig <[email protected]>

Reviewed by Kevin McCullough.

Always tag mmaped memory on darwin and clean up #defines
now that they are a little bigger.

  • interpreter/RegisterFile.h: (JSC::RegisterFile::RegisterFile):
  • jit/ExecutableAllocatorFixedVMPool.cpp: (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
  • jit/ExecutableAllocatorPosix.cpp: (JSC::ExecutablePool::systemAlloc):
  • runtime/Collector.cpp: (JSC::allocateBlock):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/Collector.cpp

    r42656 r42676  
    7575#define COLLECT_ON_EVERY_ALLOCATION 0
    7676
     77#if PLATFORM(DARWIN)
     78// On Mac OS X, the VM subsystem allows tagging memory requested from mmap and vm_map
     79// in order to aid tools that inspect system memory use.
     80#if defined(VM_MEMORY_JAVASCRIPT_CORE)
     81#define TAG_FOR_COLLECTOR_MEMORY VM_MAKE_TAG(VM_MEMORY_JAVASCRIPT_CORE)
     82#else
     83#define TAG_FOR_COLLECTOR_MEMORY VM_MAKE_TAG(63)
     84#endif
     85#endif
     86
    7787using std::max;
    7888
     
    183193{
    184194#if PLATFORM(DARWIN)
    185     #if defined(VM_MEMORY_JAVASCRIPT_CORE)
    186         #define TAG VM_MAKE_TAG(VM_MEMORY_JAVASCRIPT_CORE)
    187     #else
    188         #define TAG 0
    189     #endif
    190195    vm_address_t address = 0;
    191196    // FIXME: tag the region as a JavaScriptCore heap when we get a registered VM tag: <rdar://problem/6054788>.
    192     vm_map(current_task(), &address, BLOCK_SIZE, BLOCK_OFFSET_MASK, VM_FLAGS_ANYWHERE|TAG, MEMORY_OBJECT_NULL, 0, FALSE, VM_PROT_DEFAULT, VM_PROT_DEFAULT, VM_INHERIT_DEFAULT);
     197    vm_map(current_task(), &address, BLOCK_SIZE, BLOCK_OFFSET_MASK, VM_FLAGS_ANYWHERE | TAG_FOR_COLLECTOR_MEMORY, MEMORY_OBJECT_NULL, 0, FALSE, VM_PROT_DEFAULT, VM_PROT_DEFAULT, VM_INHERIT_DEFAULT);
    193198#elif PLATFORM(SYMBIAN)
    194199    // no memory map in symbian, need to hack with fastMalloc
     
    11311136
    11321137} // namespace JSC
     1138
     1139#if PLATFORM(DARWIN)
     1140#undef TAG_FOR_COLLECTOR_MEMORY
     1141#endif
Note: See TracChangeset for help on using the changeset viewer.