This commit is contained in:
2026-09-16 04:37:37 +02:00
parent e71245c082
commit 3e9bdf72c9
74 changed files with 555 additions and 567 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
#include <zinnia/alloc.h>
#include <zinnia/compiler.h>
#include <zinnia/mem/alloc.h>
#include <zinnia/mem/page.h>
#include <zinnia/page.h>
#include <zinnia/panic.h>
#include <zinnia/print.h>
#include <zinnia/spin.h>
@@ -56,7 +56,7 @@ void mem_phys_bootstrap(struct phys_mem* mem) {
}
static struct page* pmm_head = nullptr;
static struct spinlock pmm_lock = {0};
static spinlock_t pmm_lock = {0};
static size_t pmm_total_free = 0;
static errno_t freelist_alloc(size_t num_pages, enum alloc_flags flags, phys_t* out) {
@@ -150,5 +150,5 @@ void mem_phys_init(struct phys_mem* map, size_t length) {
}
const size_t free_bytes = (pmm_total_free * arch_mem_page_size());
printf("Total available memory: %zu MiB\n", free_bytes / 1024 / 1024);
kprintf("Total available memory: %zu MiB\n", free_bytes / 1024 / 1024);
}