mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:27:34 +00:00
Kernel: Factor out range allocation from Process::allocate_region*().
These functions were doing exactly the same thing for range allocation, so share that code in an allocate_range() helper. Region allocation will now also fail if range allocation fails, which means that mmap() can actually fail without falling apart. Exciting times!
This commit is contained in:
parent
87b54a82c7
commit
6957825444
3 changed files with 20 additions and 24 deletions
|
@ -258,6 +258,8 @@ private:
|
|||
|
||||
Process(String&& name, uid_t, gid_t, pid_t ppid, RingLevel, RetainPtr<Inode>&& cwd = nullptr, RetainPtr<Inode>&& executable = nullptr, TTY* = nullptr, Process* fork_parent = nullptr);
|
||||
|
||||
Range allocate_range(LinearAddress, size_t);
|
||||
|
||||
int do_exec(String path, Vector<String> arguments, Vector<String> environment);
|
||||
ssize_t do_write(FileDescriptor&, const byte*, int data_size);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue