fix: memory memset right size of frame_table
This commit is contained in:
parent
dc12949329
commit
1352201800
@ -113,13 +113,13 @@ static void add_frame_node(multiboot_memory_map_t *mmmt)
|
||||
nb_frame = ((size * 8) / (PAGE_SIZE * 8 + 1))
|
||||
*/
|
||||
const uint32_t nb_frame = ((len * 8) / (PAGE_SIZE * 8 + 1));
|
||||
|
||||
current->first_free_frame = 0;
|
||||
current->next = NULL;
|
||||
current->remaining_frames = nb_frame;
|
||||
current->total_frames = nb_frame;
|
||||
|
||||
memset(current->frame_table, 0, nb_frame * 4);
|
||||
memset(current->frame_table, 0,
|
||||
nb_frame * sizeof(*current->frame_table));
|
||||
|
||||
uint32_t i = 1;
|
||||
for (; i < CEIL(nb_frame, PAGE_SIZE); i++)
|
||||
|
Loading…
Reference in New Issue
Block a user