Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: don't set pool_live_bytes to zero at the end of GC #107

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1253,8 +1253,14 @@ static void reset_thread_gc_counts(void) JL_NOTSAFEPOINT
for (int i = 0; i < gc_n_threads; i++) {
jl_ptls_t ptls = gc_all_tls_states[i];
if (ptls != NULL) {
memset(&ptls->gc_num, 0, sizeof(ptls->gc_num));
// don't reset `pool_live_bytes` here
jl_atomic_store_relaxed(&ptls->gc_num.allocd, -(int64_t)gc_num.interval);
jl_atomic_store_relaxed(&ptls->gc_num.freed, 0);
jl_atomic_store_relaxed(&ptls->gc_num.malloc, 0);
jl_atomic_store_relaxed(&ptls->gc_num.realloc, 0);
jl_atomic_store_relaxed(&ptls->gc_num.poolalloc, 0);
jl_atomic_store_relaxed(&ptls->gc_num.bigalloc, 0);
jl_atomic_store_relaxed(&ptls->gc_num.freecall, 0);
}
}
}
Expand Down