Commit e6a65a2
committed
cgen: guard shared-library GC divisor tuning behind GC_is_init_called (#27555)
In a `-shared -gc boehm` library loaded into a process that already initialized
Boehm (e.g. with GC_FREE_SPACE_DIVISOR=2), the library's GC_set_free_space_divisor
ran before its own GC_INIT(), which is a no-op once GC is up and so never re-reads
the env var. That silently clobbered the host's process-wide divisor and defeated
the advertised env override. Only tune the divisor when the library is the one
bringing up the collector. The main-executable path is unchanged: it owns its GC.1 parent 18f4ad4 commit e6a65a2
2 files changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
202 | 208 | | |
203 | 209 | | |
204 | 210 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
579 | 579 | | |
580 | 580 | | |
581 | 581 | | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
582 | 586 | | |
583 | 587 | | |
584 | 588 | | |
| |||
0 commit comments