Changeset 42676 in webkit for trunk/JavaScriptCore/runtime/Collector.cpp
- Timestamp:
- Apr 20, 2009, 11:12:39 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/Collector.cpp
r42656 r42676 75 75 #define COLLECT_ON_EVERY_ALLOCATION 0 76 76 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 77 87 using std::max; 78 88 … … 183 193 { 184 194 #if PLATFORM(DARWIN) 185 #if defined(VM_MEMORY_JAVASCRIPT_CORE)186 #define TAG VM_MAKE_TAG(VM_MEMORY_JAVASCRIPT_CORE)187 #else188 #define TAG 0189 #endif190 195 vm_address_t address = 0; 191 196 // 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); 193 198 #elif PLATFORM(SYMBIAN) 194 199 // no memory map in symbian, need to hack with fastMalloc … … 1131 1136 1132 1137 } // 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.