mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-31 22:48:21 +00:00
mmu: destroy fixes
This commit is contained in:
@@ -112,8 +112,8 @@ static bool add_page(pagetableptr_t top, void *vaddr, uint64_t entry, int depth)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void destroy(uint64_t *table, int depth) {
|
static void destroy(uint64_t *table, int depth) {
|
||||||
for (int i = 0; i < 512; ++i) {
|
for (int i = 0; i < (depth == 3 ? 256 : 512); ++i) {
|
||||||
void *addr = (void *)((*table & ADDRMASK));
|
void *addr = (void *)((table[i] & ADDRMASK));
|
||||||
if (addr == NULL)
|
if (addr == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user