We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4468098 commit 186412aCopy full SHA for 186412a
src/kernel/mm/alloc/page.c
@@ -230,7 +230,8 @@ void page_free(struct mm_alloc_page *page, struct mm_alloc_heap *heap) {
230
231
struct mm_alloc_segment *segment = page_segment(page);
232
assert(segment->used_pages);
233
- if (--segment->used_pages) {
+ segment->used_pages--;
234
+ if (segment->used_pages) {
235
// There are still more pages in use, so we can't free the segment, and we
236
// know this is a page for small objects, so it should end up in the
237
// unused_pages list.
0 commit comments