From 7d0133a9640f62060a8b8ac572e28e577dd94849 Mon Sep 17 00:00:00 2001 From: Aren Date: Fri, 8 Dec 2023 18:11:18 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B0?= =?UTF-8?q?=20=D0=BD=D0=B0=20=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=D0=B4=D0=BD?= =?UTF-8?q?=D0=B8=D0=B9=20=D0=B1=D0=BB=D0=BE=D0=BA=20=D0=BF=D0=B0=D0=BC?= =?UTF-8?q?=D1=8F=D1=82=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/mem.c | 13 ++++++++++--- kernel/mod.c | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/kernel/mem.c b/kernel/mem.c index 6611db0..70d24a9 100644 --- a/kernel/mem.c +++ b/kernel/mem.c @@ -64,9 +64,16 @@ void mem_dump_memory( ) { mem_entry_t *curr = first_node; while (curr) { - fb_printf("->0x%x | %u kb | %s | 0x%x\n", &curr->data, - (curr->size) / 1024, - curr->free ? memory_types[0] : memory_types[1], curr->next); + if (curr->next) { + fb_printf("->0x%x | %u килобайт | %s | 0x%x\n", &curr->data, + (curr->size) / 1024, + curr->free ? memory_types[0] : memory_types[1], + curr->next); + } else { + fb_printf("->0x%x | %u килобайт | %s | Это последний блок\n", + &curr->data, (curr->size) / 1024, + curr->free ? memory_types[0] : memory_types[1]); + } curr = curr->next; } } diff --git a/kernel/mod.c b/kernel/mod.c index 23d2f80..2732ae3 100644 --- a/kernel/mod.c +++ b/kernel/mod.c @@ -103,7 +103,7 @@ void mod_init( ) { continue; } - module_info_t (*module_init)(env_t * env) = + module_info_t (*module_init)(env_t *env) = (module_info_t(*)(env_t * env)) elf_entry((elf64_header_t *)module_ptr->address);