mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
c624d3875e
This patch adds a globally shared zero-filled PhysicalPage that will be mapped into every slot of every zero-filled AnonymousVMObject until that page is written to, achieving CoW-like zero-filled pages. Initial testing show that this doesn't actually achieve any sharing yet but it seems like a good design regardless, since it may reduce the number of page faults taken by programs. If you look at the refcount of MM.shared_zero_page() it will have quite a high refcount, but that's just because everything maps it everywhere. If you want to see the "real" refcount, you can build with the MAP_SHARED_ZERO_PAGE_LAZILY flag, and we'll defer mapping of the shared zero page until the first NP read fault. I've left this behavior behind a flag for future testing of this code. |
||
---|---|---|
.. | ||
AnonymousVMObject.cpp | ||
AnonymousVMObject.h | ||
InodeVMObject.cpp | ||
InodeVMObject.h | ||
MemoryManager.cpp | ||
MemoryManager.h | ||
PageDirectory.cpp | ||
PageDirectory.h | ||
PhysicalPage.cpp | ||
PhysicalPage.h | ||
PhysicalRegion.cpp | ||
PhysicalRegion.h | ||
PurgeableVMObject.cpp | ||
PurgeableVMObject.h | ||
RangeAllocator.cpp | ||
RangeAllocator.h | ||
Region.cpp | ||
Region.h | ||
VMObject.cpp | ||
VMObject.h |