Skip to content

Commit 9630dec

Browse files
d-nettoRAI CI (GitHub Action Automation)
authored andcommitted
bugfix: don't set pool_live_bytes to zero at the end of GC (#107)
1 parent 309ca96 commit 9630dec

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/gc.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1176,8 +1176,14 @@ static void reset_thread_gc_counts(void) JL_NOTSAFEPOINT
11761176
for (int i = 0; i < gc_n_threads; i++) {
11771177
jl_ptls_t ptls = gc_all_tls_states[i];
11781178
if (ptls != NULL) {
1179-
memset(&ptls->gc_num, 0, sizeof(ptls->gc_num));
1179+
// don't reset `pool_live_bytes` here
11801180
jl_atomic_store_relaxed(&ptls->gc_num.allocd, -(int64_t)gc_num.interval);
1181+
jl_atomic_store_relaxed(&ptls->gc_num.freed, 0);
1182+
jl_atomic_store_relaxed(&ptls->gc_num.malloc, 0);
1183+
jl_atomic_store_relaxed(&ptls->gc_num.realloc, 0);
1184+
jl_atomic_store_relaxed(&ptls->gc_num.poolalloc, 0);
1185+
jl_atomic_store_relaxed(&ptls->gc_num.bigalloc, 0);
1186+
jl_atomic_store_relaxed(&ptls->gc_num.freecall, 0);
11811187
}
11821188
}
11831189
}

0 commit comments

Comments
 (0)