| Index: Source/wtf/PageAllocator.h
|
| diff --git a/Source/wtf/PageAllocator.h b/Source/wtf/PageAllocator.h
|
| index bcde4e24a44c92d8f41a1ed4b39ae4e9e0654f77..572acc96f98758f5d46962c5150d7456e58f6489 100644
|
| --- a/Source/wtf/PageAllocator.h
|
| +++ b/Source/wtf/PageAllocator.h
|
| @@ -107,6 +107,22 @@ WTF_EXPORT void decommitSystemPages(void* addr, size_t len);
|
| // len must be a multiple of kSystemPageSize bytes.
|
| WTF_EXPORT void recommitSystemPages(void* addr, size_t len);
|
|
|
| +// Discard one or more system pages. Discarding is a hint to the system that
|
| +// the page is no longer required. The hint may:
|
| +// - Do nothing.
|
| +// - Discard the page immediately, freeing up physical pages.
|
| +// - Discard the page at some time in the future in response to memory pressure.
|
| +// Only committed pages should be discarded. Discarding a page does not
|
| +// decommit it, and it is valid to discard an already-discarded page.
|
| +// A read or write to a discarded page will not fault.
|
| +// Reading from a discarded page may return the original page content, or a
|
| +// page full of zeroes.
|
| +// Writing to a discarded page is the only guaranteed way to tell the system
|
| +// that the page is required again. Once written to, the content of the page is // guaranteed stable once more. After being written to, the page content may be
|
| +// based on the original page content, or a page of zeroes.
|
| +// len must be a multiple of kSystemPageSize bytes.
|
| +WTF_EXPORT void discardSystemPages(void* addr, size_t len);
|
| +
|
| } // namespace WTF
|
|
|
| #endif // WTF_PageAllocator_h
|
|
|