From d59239b300271a9b9edb7063069908317e5b31f7 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Fri, 9 May 2008 18:23:23 +0000 Subject: [PATCH] Also align the given size to pages when unmapping memory. Fixes munmap() for non-aligned sizes. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25399 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/vm/vm.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/system/kernel/vm/vm.cpp b/src/system/kernel/vm/vm.cpp index 6ee0b954d7..f2ee4dd7d5 100644 --- a/src/system/kernel/vm/vm.cpp +++ b/src/system/kernel/vm/vm.cpp @@ -1198,6 +1198,7 @@ unmap_address_range(vm_address_space *addressSpace, addr_t address, addr_t size) { // TODO: Support deleting partial areas! + size = PAGE_ALIGN(size); addr_t lastAddress = address + (size - 1); // check whether any areas are only partially covered