This commit is contained in:
Jonathan Turner 2023-11-29 20:46:14 -05:00
parent 07bfda7331
commit e01b340d77

View File

@ -162,7 +162,6 @@ void print_memory(node *umem_head, node *hole_head) {
u32 total_memory = 0x3FFFF;
u32 free_memory = total_memory;
u32 total_allocated = total_memory - free_memory;
int num_of_gaps = 0;
int num_of_nodes = 0;
@ -177,20 +176,22 @@ void print_memory(node *umem_head, node *hole_head) {
hole_head = hole_head->next;
}
u32 total_allocated = total_memory - free_memory;
char a[16];
int_to_ascii( total_memory/1024, a, 16);
int_to_ascii( total_memory+1/1024, a, 16);
kprint("Total Physical Memory: ");
kprint(a);
kprint("kb\n");
char b[16];
int_to_ascii( free_memory/1024, b, 16);
int_to_ascii( free_memory+1/1024, b, 16);
kprint("Total Free: ");
kprint(b);
kprint("kb\n");
char c[16];
hex_to_ascii( total_allocated/1024, c, 16);
hex_to_ascii( total_allocated+1/1024, c, 16);
kprint("Total Allocated: ");
kprint(c);
kprint("kb\n");