Changeset 42705 in webkit for trunk/JavaScriptCore/runtime/Collector.cpp
- Timestamp:
- Apr 21, 2009, 12:23:10 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/Collector.cpp
r42676 r42705 38 38 #include <wtf/HashCountedSet.h> 39 39 #include <wtf/UnusedParam.h> 40 #include <wtf/VMTags.h> 40 41 41 42 #if PLATFORM(DARWIN) … … 46 47 #include <mach/thread_act.h> 47 48 #include <mach/vm_map.h> 48 #include <mach/vm_statistics.h>49 49 50 50 #elif PLATFORM(WIN_OS) … … 74 74 #define DEBUG_COLLECTOR 0 75 75 #define COLLECT_ON_EVERY_ALLOCATION 0 76 77 #if PLATFORM(DARWIN)78 // On Mac OS X, the VM subsystem allows tagging memory requested from mmap and vm_map79 // 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 #else83 #define TAG_FOR_COLLECTOR_MEMORY VM_MAKE_TAG(63)84 #endif85 #endif86 76 87 77 using std::max; … … 195 185 vm_address_t address = 0; 196 186 // FIXME: tag the region as a JavaScriptCore heap when we get a registered VM tag: <rdar://problem/6054788>. 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);187 vm_map(current_task(), &address, BLOCK_SIZE, BLOCK_OFFSET_MASK, VM_FLAGS_ANYWHERE | VM_TAG_FOR_COLLECTOR_MEMORY, MEMORY_OBJECT_NULL, 0, FALSE, VM_PROT_DEFAULT, VM_PROT_DEFAULT, VM_INHERIT_DEFAULT); 198 188 #elif PLATFORM(SYMBIAN) 199 189 // no memory map in symbian, need to hack with fastMalloc … … 1136 1126 1137 1127 } // namespace JSC 1138 1139 #if PLATFORM(DARWIN)1140 #undef TAG_FOR_COLLECTOR_MEMORY1141 #endif
Note:
See TracChangeset
for help on using the changeset viewer.