diff options
author | Marvin Borner | 2020-04-26 20:12:05 +0200 |
---|---|---|
committer | Marvin Borner | 2020-04-26 20:12:05 +0200 |
commit | 31f671f2137bc09e62de09142bea232c1975c76b (patch) | |
tree | 60729693e4a70d2b3d449ed396ba860d3fa33071 /src/kernel/lib/memory.c | |
parent | d3047efc1085d3e2f5524f629e55dc456a2f5065 (diff) |
Complete rewrite of paging and allocation libs
-> This was REALLY needed.
Diffstat (limited to 'src/kernel/lib/memory.c')
-rw-r--r-- | src/kernel/lib/memory.c | 10 |
1 files changed, 5 insertions, 5 deletions
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 +} |