mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-24 21:45:20 +00:00
Kernel: Allow mmap() with a size that's not a multiple of page size.
We just round it up to the next multiple of page size anyway.
This commit is contained in:
parent
fa241747af
commit
c4e984ca49
Notes:
sideshowbarker
2024-07-19 15:49:03 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/c4e984ca492
1 changed files with 1 additions and 1 deletions
|
@ -162,7 +162,7 @@ void* Process::sys$mmap(const Syscall::SC_mmap_params* params)
|
|||
off_t offset = params->offset;
|
||||
if (size == 0)
|
||||
return (void*)-EINVAL;
|
||||
if ((dword)addr & ~PAGE_MASK || size & ~PAGE_MASK)
|
||||
if ((dword)addr & ~PAGE_MASK)
|
||||
return (void*)-EINVAL;
|
||||
if (flags & MAP_ANONYMOUS) {
|
||||
// FIXME: Implement mapping at a client-specified address. Most of the support is already in plcae.
|
||||
|
|
Loading…
Add table
Reference in a new issue