Skip to content

Commit c09a199

Browse files
authored
update halfpages pointer after actually sweeping pages (#50387)
1 parent 23c0418 commit c09a199

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/gc.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1542,7 +1542,6 @@ static void gc_sweep_pool(int sweep_full)
15421542
pg->nfree = (GC_PAGE_SZ - (last_p - gc_page_data(last_p - 1))) / p->osize;
15431543
pg->has_young = 1;
15441544
}
1545-
p->newpages = NULL;
15461545
}
15471546
jl_gc_pagemeta_t *pg = ptls2->page_metadata_lazily_freed;
15481547
while (pg != NULL) {
@@ -1564,6 +1563,10 @@ static void gc_sweep_pool(int sweep_full)
15641563
pg = pg2;
15651564
}
15661565
ptls2->page_metadata_allocd = allocd;
1566+
for (int i = 0; i < JL_GC_N_POOLS; i++) {
1567+
jl_gc_pool_t *p = &ptls2->heap.norm_pools[i];
1568+
p->newpages = NULL;
1569+
}
15671570
}
15681571
}
15691572

0 commit comments

Comments
 (0)