diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-11-19 02:17:20 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-11-19 02:17:20 +0100 |
commit | 629c5be10b00dd4d8e5675018e9282b84a9586e3 (patch) | |
tree | c90856617dceed5145f5154e99f7c4ca0d625e92 /Kernel/MemoryManager.h | |
parent | e88f306d07225486c4f699d69dbfe39d79028586 (diff) | |
download | serenity-629c5be10b00dd4d8e5675018e9282b84a9586e3.zip |
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! :^)
Diffstat (limited to 'Kernel/MemoryManager.h')
-rw-r--r-- | Kernel/MemoryManager.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Kernel/MemoryManager.h b/Kernel/MemoryManager.h index a1230253ba..d68a458d01 100644 --- a/Kernel/MemoryManager.h +++ b/Kernel/MemoryManager.h @@ -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(); |