Skip to content

Commit

Permalink
Possibly incorrect allocation in function pp_alloc_clr - update mem.c
Browse files Browse the repository at this point in the history
See issue #199

Signed-off-by: Nikolai Kosmatov <[email protected]>
  • Loading branch information
nkosmatov authored Jan 2, 2025
1 parent 269f5bc commit dd07d34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/mmu/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ bool pp_alloc_clr(struct page_pool* pool, size_t n, colormap_t colors, struct pp
index = pp_next_clr(pool->base, ++index, colors);
}

index++;

}

if (allocated == n) {
Expand All @@ -158,7 +158,7 @@ bool pp_alloc_clr(struct page_pool* pool, size_t n, colormap_t colors, struct pp
* If this is the first iteration, setup index and top to search from base of the page
* pool until the previous iteration start point
*/
index = 0;
index = pp_next_clr(pool->base, 0, colors);
}
}

Expand Down

0 comments on commit dd07d34

Please sign in to comment.