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
This commit is contained in:
Ingo Weinhold 2008-05-09 18:23:23 +00:00
parent e4d9ef0e7c
commit d59239b300

View File

@ -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