Skip to content

Commit

Permalink
bugfix: update gc_n_threads in jl_gc_pool_live_bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
d-netto committed Nov 5, 2023
1 parent 65a0fd0 commit 4575f63
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3181,6 +3181,8 @@ JL_DLLEXPORT int64_t jl_gc_sync_total_bytes(int64_t offset) JL_NOTSAFEPOINT

JL_DLLEXPORT int64_t jl_gc_pool_live_bytes(void)
{
gc_n_threads = jl_atomic_load_acquire(&jl_n_threads);
gc_all_tls_states = jl_atomic_load_relaxed(&jl_all_tls_states);
int64_t pool_live_bytes = 0;
for (int i = 0; i < gc_n_threads; i++) {
jl_ptls_t ptls2 = gc_all_tls_states[i];
Expand Down

0 comments on commit 4575f63

Please sign in to comment.