diff --git a/src/system/kernel/vm/vm.cpp b/src/system/kernel/vm/vm.cpp index 12d48331f2..e5b0003c87 100644 --- a/src/system/kernel/vm/vm.cpp +++ b/src/system/kernel/vm/vm.cpp @@ -776,9 +776,10 @@ map_backing_store(VMAddressSpace* addressSpace, VMCache* cache, VMCache* newCache; // create an anonymous cache + bool isStack = (protection & B_STACK_AREA) != 0; status = VMCacheFactory::CreateAnonymousCache(newCache, - (protection & B_STACK_AREA) != 0, 0, USER_STACK_GUARD_PAGES, true, - VM_PRIORITY_USER); + isStack || (protection & B_OVERCOMMITTING_AREA) != 0, 0, + isStack ? USER_STACK_GUARD_PAGES : 0, true, VM_PRIORITY_USER); if (status != B_OK) goto err1;