[issue33597] Compact PyGC_Head

Serhiy Storchaka report at bugs.python.org
Tue May 22 11:31:12 EDT 2018


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

This is an interesting idea.

The other problem with the garbage collecting is that it modifies the memory of all collectable objects. This leads to deduplicating virtually all memory blocks after the fork, even if these objects are not used in the child.

If gc_refcnt is used only when collecting, what if allocate a linear array for them for that time? This will save less memory (only one word per object in the peak), but avoid modifying the memory of not collected objects (except pointers at the ends of generation lists and neighbors of collected objects).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33597>
_______________________________________


More information about the Python-bugs-list mailing list