[WTF] Add generic implementation for Memory querying
authordon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2018 03:01:40 +0000 (03:01 +0000)
committerdon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2018 03:01:40 +0000 (03:01 +0000)
commit1378af48585125ae4e421250056faed491530436
treef54efe5170ce9d9f82935ba38b63ed7168d36080
parentd5d72e67df5de6157caaff12fbaed4ff46997201
[WTF] Add generic implementation for Memory querying
https://bugs.webkit.org/show_bug.cgi?id=188867

Reviewed by Fujii Hironori.

Moves generic implementation of MemoryPressureHandler from
MemoryPressureHandler.cpp into MemoryPressureHandlerGeneric
and generic implementation of memoryFootprint from
MemoryFootprintLinux.cpp to MemoryFootprintGeneric.

* wtf/MemoryPressureHandler.cpp:
(WTF::MemoryPressureHandler::install): Deleted.
(WTF::MemoryPressureHandler::uninstall): Deleted.
(WTF::MemoryPressureHandler::respondToMemoryPressure): Deleted.
(WTF::MemoryPressureHandler::platformReleaseMemory): Deleted.
(WTF::MemoryPressureHandler::ReliefLogger::platformMemoryUsage): Deleted.
* wtf/PlatformJSCOnly.cmake:
* wtf/generic/MemoryFootprintGeneric.cpp: Added.
(WTF::memoryFootprint):
* wtf/generic/MemoryPressureHandlerGeneric.cpp: Added.
(WTF::MemoryPressureHandler::memoryMeasurementTimerFired):
(WTF::MemoryPressureHandler::platformReleaseMemory):
(WTF::MemoryPressureHandler::install):
(WTF::MemoryPressureHandler::uninstall):
(WTF::MemoryPressureHandler::holdOff):
(WTF::MemoryPressureHandler::respondToMemoryPressure):
(WTF::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):
* wtf/linux/CurrentProcessMemoryStatus.cpp:
* wtf/linux/CurrentProcessMemoryStatus.h:
* wtf/linux/MemoryFootprintLinux.cpp:
(WTF::computeMemoryFootprint):
(WTF::memoryFootprint):
* wtf/linux/MemoryPressureHandlerLinux.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/wtf/MemoryPressureHandler.cpp
Source/WTF/wtf/PlatformJSCOnly.cmake
Source/WTF/wtf/generic/MemoryFootprintGeneric.cpp [new file with mode: 0644]
Source/WTF/wtf/generic/MemoryPressureHandlerGeneric.cpp [new file with mode: 0644]
Source/WTF/wtf/linux/CurrentProcessMemoryStatus.cpp
Source/WTF/wtf/linux/CurrentProcessMemoryStatus.h
Source/WTF/wtf/linux/MemoryFootprintLinux.cpp
Source/WTF/wtf/linux/MemoryPressureHandlerLinux.cpp