We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34a1a8e commit ca2c8baCopy full SHA for ca2c8ba
1 file changed
src/gc.c
@@ -1169,8 +1169,14 @@ static void reset_thread_gc_counts(void) JL_NOTSAFEPOINT
1169
for (int i = 0; i < gc_n_threads; i++) {
1170
jl_ptls_t ptls = gc_all_tls_states[i];
1171
if (ptls != NULL) {
1172
- memset(&ptls->gc_num, 0, sizeof(ptls->gc_num));
+ // don't reset `pool_live_bytes` here
1173
jl_atomic_store_relaxed(&ptls->gc_num.allocd, -(int64_t)gc_num.interval);
1174
+ jl_atomic_store_relaxed(&ptls->gc_num.freed, 0);
1175
+ jl_atomic_store_relaxed(&ptls->gc_num.malloc, 0);
1176
+ jl_atomic_store_relaxed(&ptls->gc_num.realloc, 0);
1177
+ jl_atomic_store_relaxed(&ptls->gc_num.poolalloc, 0);
1178
+ jl_atomic_store_relaxed(&ptls->gc_num.bigalloc, 0);
1179
+ jl_atomic_store_relaxed(&ptls->gc_num.freecall, 0);
1180
}
1181
1182
0 commit comments