1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:57:44 +00:00

Revert "Kernel: Allocate shared memory regions immediately"

This reverts commit fe6b3f99d1.
This commit is contained in:
Tom 2021-01-02 10:16:39 -07:00 committed by Andreas Kling
parent 4bc33ee3ae
commit e3190bd144
3 changed files with 2 additions and 8 deletions

View file

@ -141,7 +141,7 @@ void* Process::sys$mmap(Userspace<const Syscall::SC_mmap_params*> user_params)
}
if (map_anonymous) {
auto strategy = map_shared ? AllocationStrategy::AllocateNow : (map_noreserve ? AllocationStrategy::None : AllocationStrategy::Reserve);
auto strategy = map_noreserve ? AllocationStrategy::None : AllocationStrategy::Reserve;
region = allocate_region(range.value(), !name.is_null() ? name : "mmap", prot, strategy);
if (!region && (!map_fixed && addr != 0))
region = allocate_region(allocate_range({}, size), !name.is_null() ? name : "mmap", prot, strategy);