Skip to content

Commit

Permalink
Merge branch 'bugfix' into bilibili
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenBaby committed Aug 20, 2022
2 parents 748013c + 349f6dc commit fc7ed19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kernel/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,9 +536,9 @@ int32 sys_brk(void *addr)

if (old_brk > brk)
{
for (; brk < old_brk; brk += PAGE_SIZE)
for (u32 page = brk; page < old_brk; page += PAGE_SIZE)
{
unlink_page(brk);
unlink_page(page);
}
}
else if (IDX(brk - old_brk) > free_pages)
Expand Down

0 comments on commit fc7ed19

Please sign in to comment.