diff --git a/Kernel/Syscalls/mmap.cpp b/Kernel/Syscalls/mmap.cpp index 8c95eb9a07..896616cd7f 100644 --- a/Kernel/Syscalls/mmap.cpp +++ b/Kernel/Syscalls/mmap.cpp @@ -195,7 +195,7 @@ ErrorOr Process::sys$mmap(Userspace use if (map_fixed) TRY(address_space().unmap_mmap_range(VirtualAddress(addr), size)); - Memory::VirtualRange requested_range { VirtualAddress { addr }, size }; + Memory::VirtualRange requested_range { VirtualAddress { addr }, rounded_size }; if (addr && !(map_fixed || map_fixed_noreplace)) { // If there's an address but MAP_FIXED wasn't specified, the address is just a hint. requested_range = { {}, 0 };