Changeset 42705 in webkit for trunk/JavaScriptCore/jit/ExecutableAllocatorPosix.cpp
- Timestamp:
- Apr 21, 2009, 12:23:10 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/jit/ExecutableAllocatorPosix.cpp
r42676 r42705 32 32 #include <sys/mman.h> 33 33 #include <unistd.h> 34 35 #if PLATFORM(DARWIN) 36 #include <mach/vm_statistics.h> 37 #endif 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 34 #include <wtf/VMTags.h> 50 35 51 36 namespace JSC { … … 58 43 ExecutablePool::Allocation ExecutablePool::systemAlloc(size_t n) 59 44 { 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 };45 ExecutablePool::Allocation alloc = { reinterpret_cast<char*>(mmap(NULL, n, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANON, VM_TAG_FOR_EXECUTABLEALLOCATOR_MEMORY, 0)), n }; 61 46 return alloc; 62 47 } … … 70 55 } 71 56 72 #undef TAG_FOR_EXECUTABLEALLOCATOR_MEMORY73 74 57 #endif // HAVE(ASSEMBLER)
Note:
See TracChangeset
for help on using the changeset viewer.