core: (struct frame_zone).addr now represent address without the header
This commit is contained in:
@ -33,8 +33,7 @@ int free_frame(void *frame_ptr)
|
||||
while (it && (frame_ptr < it->addr || frame_ptr >= it->addr + it->len))
|
||||
it = it->next;
|
||||
|
||||
uint32_t index =
|
||||
(frame_ptr + (it->len - it->size) - it->addr) / PAGE_SIZE;
|
||||
uint32_t index = ((frame_ptr - it->addr) / PAGE_SIZE);
|
||||
SET_FRAME(it->frame_table, index, 0);
|
||||
if (it->first_free_frame > index)
|
||||
it->first_free_frame = index;
|
||||
|
Reference in New Issue
Block a user