Title: [208883] trunk/Source/WebCore
Revision
208883
Author
[email protected]
Date
2016-11-18 02:03:18 -0800 (Fri, 18 Nov 2016)

Log Message

[Win32] Start releasing memory earlier when memory is running low.
https://bugs.webkit.org/show_bug.cgi?id=164862

Reviewed by Brent Fulgham.

On Windows, 32-bit processes have 2GB of memory available, where some is used by the system.
Debugging has shown that allocations might fail and cause crashes when memory usage is > ~1GB.
We should start releasing memory before we reach 1GB.

* platform/win/MemoryPressureHandlerWin.cpp:
(WebCore::CheckMemoryTimer::fired):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (208882 => 208883)


--- trunk/Source/WebCore/ChangeLog	2016-11-18 07:50:57 UTC (rev 208882)
+++ trunk/Source/WebCore/ChangeLog	2016-11-18 10:03:18 UTC (rev 208883)
@@ -1,3 +1,17 @@
+2016-11-18  Per Arne Vollan  <[email protected]>
+
+        [Win32] Start releasing memory earlier when memory is running low.
+        https://bugs.webkit.org/show_bug.cgi?id=164862
+
+        Reviewed by Brent Fulgham.
+
+        On Windows, 32-bit processes have 2GB of memory available, where some is used by the system.
+        Debugging has shown that allocations might fail and cause crashes when memory usage is > ~1GB.
+        We should start releasing memory before we reach 1GB.
+
+        * platform/win/MemoryPressureHandlerWin.cpp:
+        (WebCore::CheckMemoryTimer::fired):
+
 2016-11-17  Carlos Garcia Campos  <[email protected]>
 
         REGRESSION(r208511): ImageDecoders: Crash decoding GIF images since r208511

Modified: trunk/Source/WebCore/platform/win/MemoryPressureHandlerWin.cpp (208882 => 208883)


--- trunk/Source/WebCore/platform/win/MemoryPressureHandlerWin.cpp	2016-11-18 07:50:57 UTC (rev 208882)
+++ trunk/Source/WebCore/platform/win/MemoryPressureHandlerWin.cpp	2016-11-18 10:03:18 UTC (rev 208883)
@@ -73,7 +73,8 @@
 
     // On Windows, 32-bit processes have 2GB of memory available, where some is used by the system.
     // Debugging has shown that allocations might fail and cause crashes when memory usage is > ~1GB.
-    const int maxMemoryUsageBytes = 1024 * 1024 * 1024;
+    // We should start releasing memory before we reach 1GB.
+    const int maxMemoryUsageBytes = 0.9 * 1024 * 1024 * 1024;
 
     if (counters.PrivateUsage > maxMemoryUsageBytes)
         handleMemoryLow();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to