mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 23:12:08 +00:00
Kernel: Implement basic support for sys$mmap() with MAP_PRIVATE
You can now mmap a file as private and writable, and the changes you make will only be visible to you. This works because internally a MAP_PRIVATE region is backed by a unique PrivateInodeVMObject instead of using the globally shared SharedInodeVMObject like we always did before. :^) Fixes #1045.
This commit is contained in:
parent
aa1e209845
commit
8fbdda5a2d
11 changed files with 45 additions and 31 deletions
|
@ -109,7 +109,7 @@ public:
|
|||
Custody* custody() { return m_custody.ptr(); }
|
||||
const Custody* custody() const { return m_custody.ptr(); }
|
||||
|
||||
KResultOr<Region*> mmap(Process&, VirtualAddress, size_t offset, size_t, int prot);
|
||||
KResultOr<Region*> mmap(Process&, VirtualAddress, size_t offset, size_t, int prot, bool shared);
|
||||
|
||||
bool is_blocking() const { return m_is_blocking; }
|
||||
void set_blocking(bool b) { m_is_blocking = b; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue