summaryrefslogtreecommitdiff
path: root/Kernel/Process.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-11-08 21:20:09 +0100
committerAndreas Kling <awesomekling@gmail.com>2018-11-08 21:20:09 +0100
commitcd1e7419f0db1cb364aeab326d89d1752287cf40 (patch)
tree4552b0e8cbc19f17eef1de242b46c748757d99aa /Kernel/Process.h
parent992769c9d4610de85e0dd88d53a0008e9bcba090 (diff)
downloadserenity-cd1e7419f0db1cb364aeab326d89d1752287cf40.zip
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.
Diffstat (limited to 'Kernel/Process.h')
-rw-r--r--Kernel/Process.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Kernel/Process.h b/Kernel/Process.h
index e6adf5b2eb..dbcf7b334e 100644
--- a/Kernel/Process.h
+++ b/Kernel/Process.h
@@ -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);