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

Unified Diff: third_party/WebKit/Source/platform/heap/PageMemory.cpp

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/PageMemory.cpp
diff --git a/third_party/WebKit/Source/platform/heap/PageMemory.cpp b/third_party/WebKit/Source/platform/heap/PageMemory.cpp
index 96c5e2acc6342e75d5cc17c774466a086759a2d4..5abcd5d16c18b957983fb53576e72d9b9fd35c5a 100644
--- a/third_party/WebKit/Source/platform/heap/PageMemory.cpp
+++ b/third_party/WebKit/Source/platform/heap/PageMemory.cpp
@@ -20,9 +20,10 @@ bool MemoryRegion::Commit() {
return WTF::SetSystemPagesAccessible(base_, size_);
}
-void MemoryRegion::Decommit() {
+void MemoryRegion::Decommit(DecommitMemoryTiming decommit_hint) {
ASAN_UNPOISON_MEMORY_REGION(base_, size_);
- WTF::DecommitSystemPages(base_, size_);
+ WTF::DecommitSystemPages(
+ base_, size_, decommit_hint == DecommitMemoryTiming::DecommitPromptly);
WTF::SetSystemPagesInaccessible(base_, size_);
}
« no previous file with comments | « third_party/WebKit/Source/platform/heap/PageMemory.h ('k') | third_party/WebKit/Source/platform/heap/PagePool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698