Title: [110874] trunk/Source/_javascript_Core
Revision
110874
Author
commit-qu...@webkit.org
Date
2012-03-15 12:54:15 -0700 (Thu, 15 Mar 2012)

Log Message

Linux has madvise enough to support OSAllocator::commit/decommit
https://bugs.webkit.org/show_bug.cgi?id=80505

Patch by Hojong Han <hojong....@samsung.com> on 2012-03-15
Reviewed by Geoffrey Garen.

* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveUncommitted):
(WTF::OSAllocator::commit):
(WTF::OSAllocator::decommit):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (110873 => 110874)


--- trunk/Source/_javascript_Core/ChangeLog	2012-03-15 19:33:55 UTC (rev 110873)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-03-15 19:54:15 UTC (rev 110874)
@@ -1,3 +1,15 @@
+2012-03-15  Hojong Han  <hojong....@samsung.com>
+
+        Linux has madvise enough to support OSAllocator::commit/decommit
+        https://bugs.webkit.org/show_bug.cgi?id=80505
+
+        Reviewed by Geoffrey Garen.
+
+        * wtf/OSAllocatorPosix.cpp:
+        (WTF::OSAllocator::reserveUncommitted):
+        (WTF::OSAllocator::commit):
+        (WTF::OSAllocator::decommit):
+
 2012-03-15  Steve Falkenburg  <sfal...@apple.com>
 
         Windows build fix.

Modified: trunk/Source/_javascript_Core/wtf/OSAllocatorPosix.cpp (110873 => 110874)


--- trunk/Source/_javascript_Core/wtf/OSAllocatorPosix.cpp	2012-03-15 19:33:55 UTC (rev 110873)
+++ trunk/Source/_javascript_Core/wtf/OSAllocatorPosix.cpp	2012-03-15 19:54:15 UTC (rev 110874)
@@ -39,6 +39,8 @@
     void* result = reserveAndCommit(bytes, usage, writable, executable, includesGuardPages);
 #if OS(QNX)
     posix_madvise(result, bytes, POSIX_MADV_DONTNEED);
+#elif OS(LINUX)
+    madvise(result, bytes, MADV_DONTNEED);
 #elif HAVE(MADV_FREE_REUSE)
     // To support the "reserve then commit" model, we have to initially decommit.
     while (madvise(result, bytes, MADV_FREE_REUSABLE) == -1 && errno == EAGAIN) { }
@@ -124,6 +126,8 @@
 {
 #if OS(QNX)
     posix_madvise(address, bytes, POSIX_MADV_WILLNEED);
+#elif OS(LINUX)
+    madvise(address, bytes, MADV_WILLNEED);
 #elif HAVE(MADV_FREE_REUSE)
     while (madvise(address, bytes, MADV_FREE_REUSE) == -1 && errno == EAGAIN) { }
 #else
@@ -137,6 +141,8 @@
 {
 #if OS(QNX)
     posix_madvise(address, bytes, POSIX_MADV_DONTNEED);
+#elif OS(LINUX)
+    madvise(address, bytes, MADV_DONTNEED);
 #elif HAVE(MADV_FREE_REUSE)
     while (madvise(address, bytes, MADV_FREE_REUSABLE) == -1 && errno == EAGAIN) { }
 #elif HAVE(MADV_FREE)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to