Title: [226018] trunk/Source/WebKit
Revision
226018
Author
[email protected]
Date
2017-12-18 00:25:08 -0800 (Mon, 18 Dec 2017)

Log Message

[GTK][WPE] Enable WebProcess memory monitor
https://bugs.webkit.org/show_bug.cgi?id=180861

Reviewed by Michael Catanzaro.

For some reason this is only enabled in mac. We want to enable it also in GTK and WPE ports. This runs every 30
seconds to release memory or even kill the process if necessary. Carlos López has realized that in some
applications using video tags, the memory grows a lot and it's never released. It seems it's not memory leaked,
but simply large memory allocations (I guess it's gst allocating video frames) that make the heap grow. The
memory pressure calls malloc_trim that releases all that memory keeping the web process footprint stable.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (226017 => 226018)


--- trunk/Source/WebKit/ChangeLog	2017-12-18 05:24:05 UTC (rev 226017)
+++ trunk/Source/WebKit/ChangeLog	2017-12-18 08:25:08 UTC (rev 226018)
@@ -1,3 +1,19 @@
+2017-12-18  Carlos Garcia Campos  <[email protected]>
+
+        [GTK][WPE] Enable WebProcess memory monitor
+        https://bugs.webkit.org/show_bug.cgi?id=180861
+
+        Reviewed by Michael Catanzaro.
+
+        For some reason this is only enabled in mac. We want to enable it also in GTK and WPE ports. This runs every 30
+        seconds to release memory or even kill the process if necessary. Carlos López has realized that in some
+        applications using video tags, the memory grows a lot and it's never released. It seems it's not memory leaked,
+        but simply large memory allocations (I guess it's gst allocating video frames) that make the heap grow. The
+        memory pressure calls malloc_trim that releases all that memory keeping the web process footprint stable.
+
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::initializeWebProcess):
+
 2017-12-17  John Wilander  <[email protected]>
 
         Storage Access API: Make document.hasStorageAccess() retrieve current status from the network process

Modified: trunk/Source/WebKit/WebProcess/WebProcess.cpp (226017 => 226018)


--- trunk/Source/WebKit/WebProcess/WebProcess.cpp	2017-12-18 05:24:05 UTC (rev 226017)
+++ trunk/Source/WebKit/WebProcess/WebProcess.cpp	2017-12-18 08:25:08 UTC (rev 226018)
@@ -285,7 +285,7 @@
         memoryPressureHandler.setLowMemoryHandler([] (Critical critical, Synchronous synchronous) {
             WebCore::releaseMemory(critical, synchronous);
         });
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101200
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101200) || PLATFORM(GTK) || PLATFORM(WPE)
         memoryPressureHandler.setShouldUsePeriodicMemoryMonitor(true);
         memoryPressureHandler.setMemoryKillCallback([this] () {
             WebCore::logMemoryStatisticsAtTimeOfDeath();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to