Repository navigation
Commit dad8a8d
committed
Adapt the free-threaded build to mimalloc v2.5.2
mimalloc v2.1.4 replaced the list of abandoned segments with per-arena
bitmaps and introduced sub-processes (mi_subproc_t) to keep abandoned
segments of separate interpreters apart. Use them instead of the
CPython-specific mi_abandoned_pool_t:
- Each interpreter owns a mi_subproc_t created in init_interpreter().
It is never deleted because abandoned segments may still reference it
after the interpreter is gone.
- tstate_mimalloc_bind() sets tld->segments.subproc and uses the
upstream _mi_heap_init() signature.
- The GC and sys.getallocatedblocks() visit abandoned segments with
_mi_abandoned_visit_blocks_unlocked() while STW.1 parent fa3a143 commit dad8a8d
4 files changed
Lines changed: 27 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1823 | 1823 | | |
1824 | 1824 | | |
1825 | 1825 | | |
1826 | | - | |
1827 | | - | |
1828 | | - | |
1829 | | - | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
1830 | 1830 | | |
1831 | 1831 | | |
1832 | 1832 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
402 | | - | |
403 | | - | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
404 | 405 | | |
405 | | - | |
406 | | - | |
| 406 | + | |
| 407 | + | |
407 | 408 | | |
408 | 409 | | |
409 | 410 | | |
410 | | - | |
411 | | - | |
| 411 | + | |
| 412 | + | |
412 | 413 | | |
413 | 414 | | |
414 | 415 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
573 | 573 | | |
574 | 574 | | |
575 | 575 | | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
576 | 581 | | |
577 | 582 | | |
578 | 583 | | |
| |||
3325 | 3330 | | |
3326 | 3331 | | |
3327 | 3332 | | |
3328 | | - | |
3329 | | - | |
3330 | | - | |
3331 | | - | |
| 3333 | + | |
| 3334 | + | |
| 3335 | + | |
| 3336 | + | |
| 3337 | + | |
3332 | 3338 | | |
3333 | 3339 | | |
3334 | 3340 | | |
| |||
3346 | 3352 | | |
3347 | 3353 | | |
3348 | 3354 | | |
3349 | | - | |
| 3355 | + | |
3350 | 3356 | | |
3351 | 3357 | | |
3352 | 3358 | | |
| |||
0 commit comments