feat: expand user mode, add DOOM game, add manpages

This commit is contained in:
2026-02-18 15:13:53 +01:00
parent 605fbcbe42
commit 24af60d669
51 changed files with 4484 additions and 43 deletions
+7 -2
View File
@@ -77,12 +77,17 @@ namespace Memory {
};
}
// Allocate() returns pages from the top of a free region in descending
// order, so 'first' is the highest address. The contiguous block
// actually starts (n-1) pages below 'first'.
void* base = (void*)((uint64_t)first - (uint64_t)(n - 1) * 0x1000);
if (ptr != nullptr) {
memcpy(first, ptr, n);
memcpy(base, ptr, (uint64_t)n * 0x1000);
Free(ptr);
}
return first;
return base;
}
void PageFrameAllocator::Free(void* ptr) {