From ef384ad9a7f81c1b5dac1bb9a80f9faf3e8023df Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Thu, 1 Feb 2024 15:53:11 -0500 Subject: display mem formatted --- src/memory/physalloc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/memory/physalloc.c') diff --git a/src/memory/physalloc.c b/src/memory/physalloc.c index bcbc66d..71df848 100644 --- a/src/memory/physalloc.c +++ b/src/memory/physalloc.c @@ -218,10 +218,11 @@ void memory_init(struct memory_map *map) { page_count -= bitmap_pages; free_memory = page_count * PAGE_SIZE; + char buf[20]; kprintf("\nMEMORY USAGE\n"); - kprintf("mem total: %ld\n", memory_total()); - kprintf("mem free: %ld\n", memory_free()); - kprintf("mem used: %ld\n\n", memory_used()); + kprintf("mem total: %s\n", btoa(memory_total(), buf)); + kprintf("mem free: %s\n", btoa(memory_free(), buf)); + kprintf("mem used: %s\n\n", btoa(memory_used(), buf)); memory_unlock(); -- cgit v1.2.3-freya