From 31f671f2137bc09e62de09142bea232c1975c76b Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 26 Apr 2020 20:12:05 +0200 Subject: Complete rewrite of paging and allocation libs -> This was REALLY needed. --- src/kernel/lib/memory.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/kernel/lib/memory.c') diff --git a/src/kernel/lib/memory.c b/src/kernel/lib/memory.c index c244052..5347add 100644 --- a/src/kernel/lib/memory.c +++ b/src/kernel/lib/memory.c @@ -52,7 +52,7 @@ uint32_t memory_get_all() uint32_t memory_get_free() { - return memory_get_all() - paging_get_used_pages() * 4; + return memory_get_all() /*- paging_get_used_pages() * 4*/; } void memory_print() @@ -81,12 +81,12 @@ void memory_mmap_init(struct multiboot_tag_mmap *tag) ((struct multiboot_tag_mmap *)tag)->entry_size)) { if (mmap->type == MULTIBOOT_MEMORY_AVAILABLE) { debug("Found free memory"); - paging_set_present(mmap->addr, mmap->len >> 12); + /* paging_set_present(mmap->addr, mmap->len >> 12); */ sum += mmap->len; } else if (mmap->type == MULTIBOOT_MEMORY_RESERVED) { debug("Found reserved memory"); - paging_set_present(mmap->addr, mmap->len >> 12); - paging_set_used(mmap->addr, mmap->len >> 12); + /* paging_set_present(mmap->addr, mmap->len >> 12); */ + /* paging_set_used(mmap->addr, mmap->len >> 12); */ } else if (mmap->type == MULTIBOOT_MEMORY_ACPI_RECLAIMABLE) { debug("Found ACPI reclaimable memory"); } else if (mmap->type == MULTIBOOT_MEMORY_NVS) { @@ -116,4 +116,4 @@ int memory_init(uint32_t multiboot_address) } } return ret; -} \ No newline at end of file +} -- cgit v1.2.3