Skip to content

Commit

Permalink
update halfpages pointer after actually sweeping pages (#50387)
Browse files Browse the repository at this point in the history
  • Loading branch information
d-netto authored Jul 5, 2023
1 parent 23c0418 commit c09a199
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1542,7 +1542,6 @@ static void gc_sweep_pool(int sweep_full)
pg->nfree = (GC_PAGE_SZ - (last_p - gc_page_data(last_p - 1))) / p->osize;
pg->has_young = 1;
}
p->newpages = NULL;
}
jl_gc_pagemeta_t *pg = ptls2->page_metadata_lazily_freed;
while (pg != NULL) {
Expand All @@ -1564,6 +1563,10 @@ static void gc_sweep_pool(int sweep_full)
pg = pg2;
}
ptls2->page_metadata_allocd = allocd;
for (int i = 0; i < JL_GC_N_POOLS; i++) {
jl_gc_pool_t *p = &ptls2->heap.norm_pools[i];
p->newpages = NULL;
}
}
}

Expand Down

0 comments on commit c09a199

Please sign in to comment.