mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +00:00
Kernel: Hoist VM range allocation up to sys$mmap() itself
Instead of letting each File subclass do range allocation in their mmap() override, do it up front in sys$mmap(). This makes us honor alignment requests for file-backed memory mappings and simplifies the code somwhat.
This commit is contained in:
parent
adcc1c1eff
commit
ab14b0ac64
13 changed files with 26 additions and 36 deletions
|
@ -108,7 +108,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, bool shared);
|
||||
KResultOr<Region*> mmap(Process&, const Range&, size_t offset, 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