Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Unified Diff: Source/web/WebKit.cpp

Issue 1155293007: Expose ReleaseFreeMemory to free up memory on memory pressure or idle cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | public/web/WebKit.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebKit.cpp
diff --git a/Source/web/WebKit.cpp b/Source/web/WebKit.cpp
index 6b1bc9394ebc90a076029c3235be48e270bc17f0..0dcd5cf3699560949de1462eada9b0d6917470df 100644
--- a/Source/web/WebKit.cpp
+++ b/Source/web/WebKit.cpp
@@ -59,6 +59,7 @@
#include "wtf/Assertions.h"
#include "wtf/CryptographicallyRandomNumber.h"
#include "wtf/MainThread.h"
+#include "wtf/Partitions.h"
#include "wtf/WTF.h"
#include "wtf/text/AtomicString.h"
#include "wtf/text/TextEncoding.h"
@@ -289,4 +290,12 @@ void resetPluginCache(bool reloadPages)
Page::refreshPlugins();
}
+void ReleaseFreeMemory()
Primiano Tucci (use gerrit) 2015/06/02 17:18:55 nit: lowercase r (releaseFreeMemory)
+{
+ WTF::partitionPurgeMemory(WTF::Partitions::getBufferPartition());
Primiano Tucci (use gerrit) 2015/06/02 17:18:55 Hmm threading.. I think that here you need: 1) ASS
+ WTF::partitionPurgeMemory(WTF::Partitions::getFastMallocPartition());
+ WTF::partitionPurgeMemory(WTF::Partitions::getObjectModelPartition());
+ WTF::partitionPurgeMemory(WTF::Partitions::getRenderingPartition());
+}
+
} // namespace blink
« no previous file with comments | « no previous file | public/web/WebKit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698