Title: [208975] trunk/Source/WebCore
- Revision
- 208975
- Author
- [email protected]
- Date
- 2016-11-25 06:59:07 -0800 (Fri, 25 Nov 2016)
Log Message
MemoryPressureHandler should only trigger synchronous GC on iOS
<https://webkit.org/b/165043>
<rdar://problem/29312684>
Reviewed by Sam Weinig.
On iOS we know that there is really only one web process in play at a time,
so it's okay to do a synchronous GC immediately in response to high memory pressure.
On other platforms, we may have tens or hundreds of web processes, and if they
all start doing full GCs at the same time, it can easily bring a system to its knees
if it's already under pressure.
Fix this by using garbageCollectSoon() on non-iOS platforms.
* page/MemoryRelease.cpp:
(WebCore::releaseCriticalMemory):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (208974 => 208975)
--- trunk/Source/WebCore/ChangeLog 2016-11-24 20:10:25 UTC (rev 208974)
+++ trunk/Source/WebCore/ChangeLog 2016-11-25 14:59:07 UTC (rev 208975)
@@ -1,3 +1,23 @@
+2016-11-25 Andreas Kling <[email protected]>
+
+ MemoryPressureHandler should only trigger synchronous GC on iOS
+ <https://webkit.org/b/165043>
+ <rdar://problem/29312684>
+
+ Reviewed by Sam Weinig.
+
+ On iOS we know that there is really only one web process in play at a time,
+ so it's okay to do a synchronous GC immediately in response to high memory pressure.
+
+ On other platforms, we may have tens or hundreds of web processes, and if they
+ all start doing full GCs at the same time, it can easily bring a system to its knees
+ if it's already under pressure.
+
+ Fix this by using garbageCollectSoon() on non-iOS platforms.
+
+ * page/MemoryRelease.cpp:
+ (WebCore::releaseCriticalMemory):
+
2016-11-23 Sergio Villar Senin <[email protected]>
[css-grid] Convert grid representation into a class
Modified: trunk/Source/WebCore/page/MemoryRelease.cpp (208974 => 208975)
--- trunk/Source/WebCore/page/MemoryRelease.cpp 2016-11-24 20:10:25 UTC (rev 208974)
+++ trunk/Source/WebCore/page/MemoryRelease.cpp 2016-11-25 14:59:07 UTC (rev 208975)
@@ -125,8 +125,13 @@
if (synchronous == Synchronous::Yes) {
MemoryPressureHandler::ReliefLogger log("Collecting _javascript_ garbage");
GCController::singleton().garbageCollectNow();
- } else
+ } else {
+#if PLATFORM(IOS)
GCController::singleton().garbageCollectNowIfNotDoneRecently();
+#else
+ GCController::singleton().garbageCollectSoon();
+#endif
+ }
// We reduce tiling coverage while under memory pressure, so make sure to drop excess tiles ASAP.
Page::forEachPage([](Page& page) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes