[Win] Add memory pressure handler.
authorpeavo@outlook.com <peavo@outlook.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jul 2015 20:37:49 +0000 (20:37 +0000)
committerpeavo@outlook.com <peavo@outlook.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jul 2015 20:37:49 +0000 (20:37 +0000)
commit7c518009a34c290f894b0c2fc755de04389a3668
tree65da2eb052c2540ad54d888204986d61637b3496
parent54bd01401f211a0ad7997d73433a3d93dac5c115
[Win] Add memory pressure handler.
https://bugs.webkit.org/show_bug.cgi?id=146685

Reviewed by Brent Fulgham.

Source/WebCore:

Add memory pressure handler implementation on Windows.
We check the memory usage at regular intervals with a timer.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseMemory):
(WebCore::MemoryPressureHandler::install):
(WebCore::MemoryPressureHandler::uninstall):
(WebCore::MemoryPressureHandler::holdOff):
* platform/win/MemoryPressureHandlerWin.cpp: Added.
(WebCore::CheckMemoryTimer::CheckMemoryTimer):
(WebCore::CheckMemoryTimer::fired):
(WebCore::CheckMemoryTimer::handleMemoryLow):
(WebCore::MemoryPressureHandler::platformReleaseMemory):
(WebCore::memCheckTimer):
(WebCore::MemoryPressureHandler::install):
(WebCore::MemoryPressureHandler::uninstall):
(WebCore::MemoryPressureHandler::holdOff):
(WebCore::MemoryPressureHandler::respondToMemoryPressure):
(WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):
(WebCore::MemoryPressureHandler::ReliefLogger::platformLog):
* platform/win/Win32Handle.h:
(WebCore::Win32Handle::operator=):

Source/WebKit:

* WebKit.vcxproj/WebKit/WebKitCommon.props: Link with process api library.

Source/WebKit/win:

* WebView.cpp:
(WebView::initWithFrame): Install memory pressure handler.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186607 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/platform/MemoryPressureHandler.cpp
Source/WebCore/platform/win/MemoryPressureHandlerWin.cpp [new file with mode: 0644]
Source/WebCore/platform/win/Win32Handle.h
Source/WebKit/ChangeLog
Source/WebKit/WebKit.vcxproj/WebKit/WebKitCommon.props
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebView.cpp