kernel/vm: Make cut_area respect overcommitting flag
`cut_area` now checks the protection of the target area for the `B_OVERCOMMITTING_AREA` flag and sets it on any cache it creates. This allows operations that split large overcommitting areas to succeed. Change-Id: I8dee27d22df29741cc61af2575c9e6626da25949 Reviewed-on: https://review.haiku-os.org/c/haiku/+/6391 Tested-by: Commit checker robot <[email protected]> Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
1de4fd177c
commit
74d2e61ee2
@@ -745,7 +745,8 @@ cut_area(VMAddressSpace* addressSpace, VMArea* area, addr_t address,
|
||||
if (onlyCacheUser) {
|
||||
// Create a new cache for the second area.
|
||||
VMCache* secondCache;
|
||||
error = VMCacheFactory::CreateAnonymousCache(secondCache, false, 0, 0,
|
||||
error = VMCacheFactory::CreateAnonymousCache(secondCache,
|
||||
area->protection & B_OVERCOMMITTING_AREA, 0, 0,
|
||||
dynamic_cast<VMAnonymousNoSwapCache*>(cache) == NULL, priority);
|
||||
if (error != B_OK) {
|
||||
addressSpace->ShrinkAreaTail(area, oldSize, allocationFlags);
|
||||
|
||||
Reference in New Issue
Block a user