From 278f7e57cda2ed43a21583538c749ce577604d89 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Fri, 30 Apr 2010 11:55:27 +0000 Subject: [PATCH] map_backing_store(): Also consider the B_OVERCOMMITTING_AREA for private maps. The new cache will be created in over-committing mode. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36550 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/vm/vm.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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;