mirror of
https://github.com/0Nera/BMOSP.git
synced 2025-01-20 19:42:02 +03:00
Добавлена проверка на последний блок памяти
This commit is contained in:
parent
a477da15b5
commit
7d0133a964
13
kernel/mem.c
13
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;
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user