Changeset 42676 in webkit for trunk/JavaScriptCore/jit/ExecutableAllocatorPosix.cpp
- Timestamp:
- Apr 20, 2009, 11:12:39 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/jit/ExecutableAllocatorPosix.cpp
r42649 r42676 37 37 #endif 38 38 39 #if PLATFORM(DARWIN) 40 // On Mac OS X, the VM subsystem allows tagging memory requested from mmap and vm_map 41 // in order to aid tools that inspect system memory use. 42 #if defined(VM_MEMORY_JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR) 43 #define TAG_FOR_EXECUTABLEALLOCATOR_MEMORY VM_MAKE_TAG(VM_MEMORY_JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR) 44 #else 45 #define TAG_FOR_EXECUTABLEALLOCATOR_MEMORY VM_MAKE_TAG(64) 46 #endif 47 #else 48 #define TAG_FOR_EXECUTABLEALLOCATOR_MEMORY -1 49 #endif 50 39 51 namespace JSC { 40 52 … … 46 58 ExecutablePool::Allocation ExecutablePool::systemAlloc(size_t n) 47 59 { 48 #if PLATFORM(DARWIN) && defined(VM_MEMORY_JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR) 49 #define OPTIONAL_TAG VM_MAKE_TAG(VM_MEMORY_JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR) 50 #else 51 #define OPTIONAL_TAG -1 52 #endif 53 54 ExecutablePool::Allocation alloc = { reinterpret_cast<char*>(mmap(NULL, n, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANON, OPTIONAL_TAG, 0)), n }; 60 ExecutablePool::Allocation alloc = { reinterpret_cast<char*>(mmap(NULL, n, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANON, TAG_FOR_EXECUTABLEALLOCATOR_MEMORY, 0)), n }; 55 61 return alloc; 56 62 } … … 64 70 } 65 71 72 #undef TAG_FOR_EXECUTABLEALLOCATOR_MEMORY 73 66 74 #endif // HAVE(ASSEMBLER)
Note:
See TracChangeset
for help on using the changeset viewer.