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

Unified Diff: third_party/WebKit/Source/platform/heap/PagePool.h

Issue 2942233002: Add some support for promptly purging pages.
Patch Set: add MADV_FREE fallback Created 3 years, 6 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
Index: third_party/WebKit/Source/platform/heap/PagePool.h
diff --git a/third_party/WebKit/Source/platform/heap/PagePool.h b/third_party/WebKit/Source/platform/heap/PagePool.h
index 082f83f15e8f265b6df080c280a3ae84df4a03f4..55620c07832da0d2ca6f6f853790d78a7858febe 100644
--- a/third_party/WebKit/Source/platform/heap/PagePool.h
+++ b/third_party/WebKit/Source/platform/heap/PagePool.h
@@ -12,6 +12,8 @@ namespace blink {
class PageMemory;
+enum class DecommitMemoryTiming { DecommitAsAppropriate, DecommitPromptly };
+
// Once pages have been used for one type of thread heap they will never be
// reused for another type of thread heap. Instead of unmapping, we add the
// pages to a pool of pages to be reused later by a thread heap of the same
@@ -26,7 +28,10 @@ class PagePool {
public:
PagePool();
~PagePool();
- void Add(int, PageMemory*);
+
+ void Add(int,
+ PageMemory*,
+ DecommitMemoryTiming = DecommitMemoryTiming::DecommitAsAppropriate);
PageMemory* Take(int);
private:
« no previous file with comments | « third_party/WebKit/Source/platform/heap/PageMemory.cpp ('k') | third_party/WebKit/Source/platform/heap/PagePool.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698