mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:57:44 +00:00
Add basic zero faults.
mmap() will now map uncommitted pages that get allocated and zeroed upon the first access. I also made /proc/PID/vm show number of "committed" bytes in each region. This is so cool! :^)
This commit is contained in:
parent
e88f306d07
commit
629c5be10b
5 changed files with 42 additions and 7 deletions
|
@ -132,6 +132,8 @@ public:
|
|||
int commit(Process&);
|
||||
int decommit(Process&);
|
||||
|
||||
size_t committed() const;
|
||||
|
||||
LinearAddress linearAddress;
|
||||
size_t size { 0 };
|
||||
size_t m_offset_in_vmo { 0 };
|
||||
|
@ -209,6 +211,7 @@ private:
|
|||
|
||||
bool copy_on_write(Process&, Region&, unsigned page_index_in_region);
|
||||
bool page_in_from_vnode(PageDirectory&, Region&, unsigned page_index_in_region);
|
||||
bool zero_page(PageDirectory&, Region& region, unsigned page_index_in_region);
|
||||
|
||||
byte* quickmap_page(PhysicalPage&);
|
||||
void unquickmap_page();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue