Changeset 269808 in webkit


Ignore:
Timestamp:
Nov 13, 2020 5:09:38 PM (3 years ago)
Author:
Chris Dumez
Message:

[GPUProcess] Add basic low memory handling in the GPUProcess
https://bugs.webkit.org/show_bug.cgi?id=218926
<rdar://problem/70300888>

Reviewed by Geoffrey Garen.

Add basic low memory handling in the GPUProcess. For now, the GPUProcess only calls
WTF::releaseFastMallocFreeMemory() on low memory warning.

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::initializeGPUProcess):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r269807 r269808  
     12020-11-13  Chris Dumez  <cdumez@apple.com>
     2
     3        [GPUProcess] Add basic low memory handling in the GPUProcess
     4        https://bugs.webkit.org/show_bug.cgi?id=218926
     5        <rdar://problem/70300888>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        Add basic low memory handling in the GPUProcess. For now, the GPUProcess only calls
     10        WTF::releaseFastMallocFreeMemory() on low memory warning.
     11
     12        * GPUProcess/GPUProcess.cpp:
     13        (WebKit::GPUProcess::initializeGPUProcess):
     14
    1152020-11-13  Kate Cheney  <katherine_cheney@apple.com>
    216
  • trunk/Source/WebKit/GPUProcess/GPUProcess.cpp

    r267156 r269808  
    4646#include <wtf/Algorithms.h>
    4747#include <wtf/CallbackAggregator.h>
     48#include <wtf/MemoryPressureHandler.h>
    4849#include <wtf/OptionSet.h>
    4950#include <wtf/ProcessPrivilege.h>
     
    128129    WTF::Thread::setCurrentThreadIsUserInitiated();
    129130    AtomString::init();
     131
     132    auto& memoryPressureHandler = MemoryPressureHandler::singleton();
     133    memoryPressureHandler.setLowMemoryHandler([this] (Critical critical, Synchronous) {
     134        lowMemoryHandler(critical);
     135    });
     136    memoryPressureHandler.install();
    130137
    131138#if PLATFORM(IOS_FAMILY) || ENABLE(ROUTING_ARBITRATION)
Note: See TracChangeset for help on using the changeset viewer.