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

Unified Diff: third_party/WebKit/Source/wtf/PageAllocator.h

Issue 1666083002: Oilpan: Discard unused system pages when sweeping NormalPageHeaps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/wtf/PageAllocator.h
diff --git a/third_party/WebKit/Source/wtf/PageAllocator.h b/third_party/WebKit/Source/wtf/PageAllocator.h
index 8db9fe30d96e99391bf95a6bcde234d1b326a194..5714f1692020b607e9fbf562bbbf1ef046f772b1 100644
--- a/third_party/WebKit/Source/wtf/PageAllocator.h
+++ b/third_party/WebKit/Source/wtf/PageAllocator.h
@@ -126,6 +126,16 @@ WTF_EXPORT void recommitSystemPages(void* addr, size_t len);
// len must be a multiple of kSystemPageSize bytes.
WTF_EXPORT void discardSystemPages(void* addr, size_t len);
+WTF_EXPORT ALWAYS_INLINE uintptr_t roundUpToSystemPage(uintptr_t address)
+{
+ return (address + kSystemPageOffsetMask) & kSystemPageBaseMask;
+}
+
+WTF_EXPORT ALWAYS_INLINE uintptr_t roundDownToSystemPage(uintptr_t address)
+{
+ return address & kSystemPageBaseMask;
+}
+
} // namespace WTF
#endif // WTF_PageAllocator_h
« no previous file with comments | « third_party/WebKit/Source/platform/testing/RunAllTests.cpp ('k') | third_party/WebKit/Source/wtf/PartitionAlloc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698