Title: [169977] trunk/Source/WebCore
Revision
169977
Author
[email protected]
Date
2014-06-14 12:39:19 -0700 (Sat, 14 Jun 2014)

Log Message

GCController should return FastMalloc memory to the system.
<https://webkit.org/b/133884>

Reviewed by Anders Carlsson.

Speculative test fix; I'm kinda suspecting that some tests are reporting
more memory used because we did a GC but didn't get around to returning
free pages to the system yet.

* bindings/js/GCController.cpp:
(WebCore::GCController::garbageCollectNow):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (169976 => 169977)


--- trunk/Source/WebCore/ChangeLog	2014-06-14 19:13:46 UTC (rev 169976)
+++ trunk/Source/WebCore/ChangeLog	2014-06-14 19:39:19 UTC (rev 169977)
@@ -1,3 +1,17 @@
+2014-06-14  Andreas Kling  <[email protected]>
+
+        GCController should return FastMalloc memory to the system.
+        <https://webkit.org/b/133884>
+
+        Reviewed by Anders Carlsson.
+
+        Speculative test fix; I'm kinda suspecting that some tests are reporting
+        more memory used because we did a GC but didn't get around to returning
+        free pages to the system yet.
+
+        * bindings/js/GCController.cpp:
+        (WebCore::GCController::garbageCollectNow):
+
 2014-06-14  Zan Dobersek  <[email protected]>
 
         Generate HTTP header names that are required by WebKitWebSrc

Modified: trunk/Source/WebCore/bindings/js/GCController.cpp (169976 => 169977)


--- trunk/Source/WebCore/bindings/js/GCController.cpp	2014-06-14 19:13:46 UTC (rev 169976)
+++ trunk/Source/WebCore/bindings/js/GCController.cpp	2014-06-14 19:39:19 UTC (rev 169977)
@@ -31,6 +31,7 @@
 #include <runtime/JSLock.h>
 #include <heap/Heap.h>
 #include <wtf/StdLibExtras.h>
+#include <wtf/FastMalloc.h>
 
 using namespace JSC;
 
@@ -81,8 +82,10 @@
 void GCController::garbageCollectNow()
 {
     JSLockHolder lock(JSDOMWindow::commonVM());
-    if (!JSDOMWindow::commonVM().heap.isBusy())
+    if (!JSDOMWindow::commonVM().heap.isBusy()) {
         JSDOMWindow::commonVM().heap.collectAllGarbage();
+        WTF::releaseFastMallocFreeMemory();
+    }
 }
 
 void GCController::garbageCollectOnAlternateThreadForDebugging(bool waitUntilDone)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to