We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2287687 commit 268ea2aCopy full SHA for 268ea2a
src/gc.c
@@ -3342,9 +3342,11 @@ JL_DLLEXPORT int64_t jl_gc_sync_total_bytes(int64_t offset) JL_NOTSAFEPOINT
3342
3343
JL_DLLEXPORT int64_t jl_gc_pool_live_bytes(void)
3344
{
3345
+ int n_threads = jl_atomic_load_acquire(&jl_n_threads);
3346
+ jl_ptls_t *all_tls_states = jl_atomic_load_relaxed(&jl_all_tls_states);
3347
int64_t pool_live_bytes = 0;
- for (int i = 0; i < gc_n_threads; i++) {
- jl_ptls_t ptls2 = gc_all_tls_states[i];
3348
+ for (int i = 0; i < n_threads; i++) {
3349
+ jl_ptls_t ptls2 = all_tls_states[i];
3350
if (ptls2 != NULL) {
3351
pool_live_bytes += jl_atomic_load_relaxed(&ptls2->gc_num.pool_live_bytes);
3352
}
0 commit comments