pmm: full rewrite

I've decided to do a rewrite on it due to some plans that would make refcounting physical pages nescessary among other things. now instead of a bitmap it uses a list of pages with each physical page having a page_t associated with it
This commit is contained in:
Matheus
2023-07-29 17:14:41 -03:00
parent 8ca2360991
commit 55fc1b7026
11 changed files with 267 additions and 179 deletions
+2 -2
View File
@@ -126,7 +126,7 @@ void initrd_unpack() {
for (;;) {
if (cleanupbytespassed >= PAGE_SIZE) {
size_t pagec = cleanupbytespassed / PAGE_SIZE;
pmm_free(FROM_HHDM(cleanupptr), pagec);
pmm_makefree(FROM_HHDM(cleanupptr), pagec);
cleanupptr = (void *)((uintptr_t)cleanupptr + ROUND_DOWN(cleanupbytespassed, PAGE_SIZE));
cleanupbytespassed %= PAGE_SIZE;
}
@@ -174,5 +174,5 @@ void initrd_unpack() {
}
// free remaining pages to be freed
pmm_free(FROM_HHDM(cleanupptr), ROUND_UP(cleanupbytespassed, PAGE_SIZE) / PAGE_SIZE);
pmm_makefree(FROM_HHDM(cleanupptr), ROUND_UP(cleanupbytespassed, PAGE_SIZE) / PAGE_SIZE);
}