mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
dbb644f20c
It's now possible to get purgeable memory by using mmap(MAP_PURGEABLE). Purgeable memory has a "volatile" flag that can be set using madvise(): - madvise(..., MADV_SET_VOLATILE) - madvise(..., MADV_SET_NONVOLATILE) When in the "volatile" state, the kernel may take away the underlying physical memory pages at any time, without notifying the owner. This gives you a guilt discount when caching very large things. :^) Setting a purgeable region to non-volatile will return whether or not the memory has been taken away by the kernel while being volatile. Basically, if madvise(..., MADV_SET_NONVOLATILE) returns 1, that means the memory was purged while volatile, and whatever was in that piece of memory needs to be reconstructed before use. |
||
---|---|---|
.. | ||
AnonymousVMObject.cpp | ||
AnonymousVMObject.h | ||
InodeVMObject.cpp | ||
InodeVMObject.h | ||
MemoryManager.cpp | ||
MemoryManager.h | ||
PageDirectory.cpp | ||
PageDirectory.h | ||
PhysicalAddress.h | ||
PhysicalPage.cpp | ||
PhysicalPage.h | ||
PhysicalRegion.cpp | ||
PhysicalRegion.h | ||
PurgeableVMObject.cpp | ||
PurgeableVMObject.h | ||
RangeAllocator.cpp | ||
RangeAllocator.h | ||
Region.cpp | ||
Region.h | ||
VirtualAddress.h | ||
VMObject.cpp | ||
VMObject.h |