yeah
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user