mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:37:45 +00:00
Teach Process::exec() about the magic of file-backed VMO's.
This is really sweet! :^) The four instances of /bin/sh spawned at startup now share their read-only text pages. There are problems and limitations here, and plenty of room for improvement. But it kinda works.
This commit is contained in:
parent
992769c9d4
commit
cd1e7419f0
10 changed files with 159 additions and 70 deletions
|
@ -14,6 +14,7 @@
|
|||
class FileDescriptor;
|
||||
class PageDirectory;
|
||||
class Region;
|
||||
class VMObject;
|
||||
class Zone;
|
||||
|
||||
#define COOL_GLOBALS
|
||||
|
@ -253,7 +254,8 @@ private:
|
|||
TTY* m_tty { nullptr };
|
||||
|
||||
Region* allocate_region(LinearAddress, size_t, String&& name, bool is_readable = true, bool is_writable = true);
|
||||
Region* allocate_file_backed_region(LinearAddress laddr, size_t size, RetainPtr<VirtualFileSystem::Node>&& vnode, String&& name, bool is_readable, bool is_writable);
|
||||
Region* allocate_file_backed_region(LinearAddress, size_t, RetainPtr<VirtualFileSystem::Node>&& vnode, String&& name, bool is_readable, bool is_writable);
|
||||
Region* allocate_region_with_vmo(LinearAddress, size_t, RetainPtr<VMObject>&&, size_t offset_in_vmo, String&& name, bool is_readable, bool is_writable);
|
||||
bool deallocate_region(Region& region);
|
||||
|
||||
Region* regionFromRange(LinearAddress, size_t);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue