this better not be it.

This commit is contained in:
Jonathan Turner 2023-11-29 20:35:42 -05:00
parent 5069e4cefc
commit ec629f31e2

View File

@ -161,18 +161,26 @@
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;
// while (umem_head
u32 free_memory = total_memory;
u32 total_allocated = total_memory - free_memory;
int num_of_gaps = 0;
int num_of_nodes = 0;
while (umem_head != NULL) {
num_of_nodes++;
free_memory = free_memory - umem_head->limit_register;
umem_head = umem_head->next;
}
while (hole_head != NULL) {
num_of_gaps++;
}
char c[16];
hex_to_ascii( total_memory, c, 16);
hex_to_ascii( total_memory/1024, c, 16);
kprint("Total Physical Memory: ");
kprint(c);
kprint("\n");
kprint("kb\n");
print_list(umem_head, false);
print_list(hole_head, false);