[Python-Dev] reference leaks, del, and annotations (original) (raw)
Tim Peters tim.peters at gmail.com
Mon Apr 3 22:02:06 CEST 2006
- Previous message: [Python-Dev] reference leaks, __del__, and annotations
- Next message: [Python-Dev] reference leaks, __del__, and annotations
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Guido]
but don't we have a whole word of GC-related flags?
[Neil S]
No.
[James Y Knight]
Actually there is. Kinda. Currently python's refcounting scheme uses 4 words per object (gcnext, gcprev, gcrefs, obrefcnt), and has one spare word in the padding of PyGCHead that's just sitting there wasting memory.
Using which compiler? This varies across boxes. Most obviously, on a 64-bit box all these members are 8 bytes (note that ob_refcnt is Py_ssize_t in 2.5, not int anymore), but even on some 32-bit boxes the "long double" trick only forces 4-byte alignment.
- Previous message: [Python-Dev] reference leaks, __del__, and annotations
- Next message: [Python-Dev] reference leaks, __del__, and annotations
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]