Changeset 105918 in webkit
- Timestamp:
- Jan 25, 2012 12:52:41 PM (12 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r105905 r105918 1 2012-01-25 Yong Li <yoli@rim.com> 2 3 [BlackBerry] Implement OSAllocator::commit/decommit. 4 BlackBerry port should support virtual memory decommiting. 5 https://bugs.webkit.org/show_bug.cgi?id=77013 6 7 Reviewed by Rob Buis. 8 9 * wtf/OSAllocatorPosix.cpp: 10 (WTF::OSAllocator::reserveUncommitted): 11 (WTF::OSAllocator::commit): 12 (WTF::OSAllocator::decommit): 13 * wtf/Platform.h: 14 1 15 2012-01-24 Oliver Hunt <oliver@apple.com> 2 16 -
trunk/Source/JavaScriptCore/wtf/OSAllocatorPosix.cpp
r100175 r105918 38 38 { 39 39 void* result = reserveAndCommit(bytes, usage, writable, executable, includesGuardPages); 40 #if HAVE(MADV_FREE_REUSE) 40 #if OS(QNX) 41 posix_madvise(result, bytes, POSIX_MADV_DONTNEED); 42 #elif HAVE(MADV_FREE_REUSE) 41 43 // To support the "reserve then commit" model, we have to initially decommit. 42 44 while (madvise(result, bytes, MADV_FREE_REUSABLE) == -1 && errno == EAGAIN) { } … … 121 123 void OSAllocator::commit(void* address, size_t bytes, bool, bool) 122 124 { 123 #if HAVE(MADV_FREE_REUSE) 125 #if OS(QNX) 126 posix_madvise(address, bytes, POSIX_MADV_WILLNEED); 127 #elif HAVE(MADV_FREE_REUSE) 124 128 while (madvise(address, bytes, MADV_FREE_REUSE) == -1 && errno == EAGAIN) { } 125 129 #else … … 132 136 void OSAllocator::decommit(void* address, size_t bytes) 133 137 { 134 #if HAVE(MADV_FREE_REUSE) 138 #if OS(QNX) 139 posix_madvise(address, bytes, POSIX_MADV_DONTNEED); 140 #elif HAVE(MADV_FREE_REUSE) 135 141 while (madvise(address, bytes, MADV_FREE_REUSABLE) == -1 && errno == EAGAIN) { } 136 142 #elif HAVE(MADV_FREE) -
trunk/Source/JavaScriptCore/wtf/Platform.h
r105098 r105918 724 724 #define HAVE_ERRNO_H 1 725 725 #define HAVE_MMAP 1 726 #define HAVE_MADV_FREE_REUSE 1 727 #define HAVE_MADV_FREE 1 726 728 #define HAVE_SBRK 1 727 729 #define HAVE_STRINGS_H 1
Note: See TracChangeset
for help on using the changeset viewer.