mirror of
https://github.com/citra-emu/citra-canary.git
synced 2024-12-23 20:05:41 +00:00
Memory: Fix unmapping of pages
This commit is contained in:
parent
34f5f77507
commit
51820691e7
|
@ -59,13 +59,11 @@ static void MapPages(u32 base, u32 size, u8* memory, PageType type) {
|
||||||
while (base != end) {
|
while (base != end) {
|
||||||
ASSERT_MSG(base < PageTable::NUM_ENTRIES, "out of range mapping at %08X", base);
|
ASSERT_MSG(base < PageTable::NUM_ENTRIES, "out of range mapping at %08X", base);
|
||||||
|
|
||||||
if (current_page_table->attributes[base] != PageType::Unmapped && type != PageType::Unmapped) {
|
|
||||||
LOG_ERROR(HW_Memory, "overlapping memory ranges at %08X", base * PAGE_SIZE);
|
|
||||||
}
|
|
||||||
current_page_table->attributes[base] = type;
|
current_page_table->attributes[base] = type;
|
||||||
current_page_table->pointers[base] = memory;
|
current_page_table->pointers[base] = memory;
|
||||||
|
|
||||||
base += 1;
|
base += 1;
|
||||||
|
if (memory != nullptr)
|
||||||
memory += PAGE_SIZE;
|
memory += PAGE_SIZE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue