93. Immortal Objects
PEP 683 immortal objects: _Py_IMMORTAL_REFCNT sentinel, zero-cost incref/decref, and implications for forks.
5 notes
PEP 683 immortal objects: _Py_IMMORTAL_REFCNT sentinel, zero-cost incref/decref, and implications for forks.
Object allocation locality, arena page placement, freelists for common types, and cache-line–aware design.
Borrowed vs. owned references, Py_XDECREF patterns, and common reference counting mistakes in extensions.
gc.collect, gc.get_objects, gc.freeze, callbacks, and tuning generational thresholds.
Copy array elements into a new storage block using shallow or deep copy semantics.