mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-29 13:48:21 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user