1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-02 23:22:07 +00:00

Kernel+LibC: Allow sys$mmap() callers to specify address alignment

This is exposed via the non-standard serenity_mmap() call in userspace.
This commit is contained in:
Andreas Kling 2020-02-16 12:55:56 +01:00
parent 02e199a9cb
commit 31e1af732f
7 changed files with 66 additions and 30 deletions

View file

@ -364,6 +364,8 @@ public:
Region* allocate_region_with_vmobject(VirtualAddress, size_t, NonnullRefPtr<VMObject>, size_t offset_in_vmobject, const String& name, int prot, bool user_accessible = true);
Region* allocate_file_backed_region(VirtualAddress, size_t, NonnullRefPtr<Inode>, const String& name, int prot);
Region* allocate_region(VirtualAddress, size_t, const String& name, int prot = PROT_READ | PROT_WRITE, bool commit = true);
Region* allocate_region_with_vmobject(const Range&, NonnullRefPtr<VMObject>, size_t offset_in_vmobject, const String& name, int prot, bool user_accessible = true);
Region* allocate_region(const Range&, const String& name, int prot = PROT_READ | PROT_WRITE, bool commit = true);
bool deallocate_region(Region& region);
Region& allocate_split_region(const Region& source_region, const Range&, size_t offset_in_vmobject);
@ -405,7 +407,7 @@ private:
Process(Thread*& first_thread, const String& name, uid_t, gid_t, pid_t ppid, RingLevel, RefPtr<Custody> cwd = nullptr, RefPtr<Custody> executable = nullptr, TTY* = nullptr, Process* fork_parent = nullptr);
static pid_t allocate_pid();
Range allocate_range(VirtualAddress, size_t);
Range allocate_range(VirtualAddress, size_t, size_t alignment = PAGE_SIZE);
Region& add_region(NonnullOwnPtr<Region>);