Changeset 180053 in webkit
- Timestamp:
- Feb 13, 2015, 9:38:50 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r180051 r180053 1 2015-02-13 Andreas Kling <akling@apple.com> 2 3 [iOS] Refine GC behavior in response to process suspension and memory pressure. 4 <https://webkit.org/b/141543> 5 <rdar://problem/19738024> 6 7 Reviewed by Geoffrey Garen. 8 9 Do an immediate full garbage collection when the web process is about to 10 be suspended (when another tab is moving to the foreground on iOS.) 11 This ensures that we make a best effort to reduce the process footprint 12 before we lose the ability to execute code. 13 14 When receiving a memory pressure warning, tell the garbage collector to 15 accelerate its next collection (by calling garbageCollectSoon().) 16 This gives us some confidence that a collection will happen within a 17 reasonable timeframe, but doesn't risk dooming us to a loop of endless 18 garbage collections. 19 20 * platform/cocoa/MemoryPressureHandlerCocoa.mm: 21 (WebCore::MemoryPressureHandler::platformReleaseMemory): 22 1 23 2015-02-13 Antti Koivisto <antti@apple.com> 2 24 -
trunk/Source/WebCore/platform/cocoa/MemoryPressureHandlerCocoa.mm
r179737 r180053 62 62 63 63 #if PLATFORM(IOS) 64 { 64 if (memoryPressureHandler().isUnderMemoryPressure()) { 65 gcController().garbageCollectSoon(); 66 } else { 67 // If we're not under memory pressure, that means we're here due to impending process suspension. 68 // Do a full GC since this is our last chance to run any code. 65 69 ReliefLogger log("Collecting JavaScript garbage"); 66 70 gcController().garbageCollectNow();
Note:
See TracChangeset
for help on using the changeset viewer.