summaryrefslogtreecommitdiff
path: root/src/memory/physalloc.c
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-02-01 15:53:11 -0500
committerFreya Murphy <freya@freyacat.org>2024-02-01 15:53:11 -0500
commitef384ad9a7f81c1b5dac1bb9a80f9faf3e8023df (patch)
tree8a32d38c8152f57c09e01a39587237c99c4614fc /src/memory/physalloc.c
parentupdate makefile (diff)
downloadcorn-ef384ad9a7f81c1b5dac1bb9a80f9faf3e8023df.tar.gz
corn-ef384ad9a7f81c1b5dac1bb9a80f9faf3e8023df.tar.bz2
corn-ef384ad9a7f81c1b5dac1bb9a80f9faf3e8023df.zip
display mem formatted
Diffstat (limited to 'src/memory/physalloc.c')
-rw-r--r--src/memory/physalloc.c7
1 files changed, 4 insertions, 3 deletions
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();