UnmapPage() requires the caller to deal with the debug page access marking,
so the fallback implementations of UnmapPages() and UnmapArea() need to do that. Not relevant for x86. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35476 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
0f2666ecc2
commit
c1f3da7b5b
@ -40,8 +40,25 @@ VMTranslationMap::UnmapPages(VMArea* area, addr_t base, size_t size,
|
||||
|
||||
addr_t address = base;
|
||||
addr_t end = address + size;
|
||||
#if DEBUG_PAGE_ACCESS
|
||||
for (; address != end; address += B_PAGE_SIZE) {
|
||||
addr_t physicalAddress;
|
||||
uint32 flags;
|
||||
if (map->Query(address, &physicalAddress, &flags) == B_OK
|
||||
&& (flags & PAGE_PRESENT) == 0) {
|
||||
vm_page* page = vm_lookup_page(physicalAddress / B_PAGE_SIZE);
|
||||
if (page != NULL) {
|
||||
DEBUG_PAGE_ACCESS_START(page);
|
||||
UnmapPage(area, address, updatePageQueue);
|
||||
DEBUG_PAGE_ACCESS_END(page);
|
||||
} else
|
||||
UnmapPage(area, address, updatePageQueue);
|
||||
}
|
||||
}
|
||||
#else
|
||||
for (; address != end; address += B_PAGE_SIZE)
|
||||
UnmapPage(area, address, updatePageQueue);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -64,8 +81,25 @@ VMTranslationMap::UnmapArea(VMArea* area, bool deletingAddressSpace,
|
||||
{
|
||||
addr_t address = area->Base();
|
||||
addr_t end = address + area->Size();
|
||||
#if DEBUG_PAGE_ACCESS
|
||||
for (; address != end; address += B_PAGE_SIZE) {
|
||||
addr_t physicalAddress;
|
||||
uint32 flags;
|
||||
if (map->Query(address, &physicalAddress, &flags) == B_OK
|
||||
&& (flags & PAGE_PRESENT) == 0) {
|
||||
vm_page* page = vm_lookup_page(physicalAddress / B_PAGE_SIZE);
|
||||
if (page != NULL) {
|
||||
DEBUG_PAGE_ACCESS_START(page);
|
||||
UnmapPage(area, address, true);
|
||||
DEBUG_PAGE_ACCESS_END(page);
|
||||
} else
|
||||
UnmapPage(area, address, true);
|
||||
}
|
||||
}
|
||||
#else
|
||||
for (; address != end; address += B_PAGE_SIZE)
|
||||
UnmapPage(area, address, true);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user