diff options
Diffstat (limited to 'src/kernel/lib')
-rw-r--r-- | src/kernel/lib/memory.c | 10 | ||||
-rw-r--r-- | src/kernel/lib/stdlib/itoa.c | 5 |
2 files changed, 6 insertions, 9 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 +} diff --git a/src/kernel/lib/stdlib/itoa.c b/src/kernel/lib/stdlib/itoa.c index 94c3351..e6300d9 100644 --- a/src/kernel/lib/stdlib/itoa.c +++ b/src/kernel/lib/stdlib/itoa.c @@ -8,9 +8,6 @@ static const char ITOA_TABLE[] = "0123456789"; char *itoa(int n) { - if (paging_enabled == 0) - return "0"; // kmalloc isn't available - if (!n) { char *ret = (char *)kmalloc(2); ret[0] = '0'; @@ -44,4 +41,4 @@ char *itoa(int n) strinv(ret); return ret; -}
\ No newline at end of file +} |