Size: 1208
Comment: converted to 1.6 markup
|
← Revision 6 as of 2010-11-27 04:19:23 ⇥
Size: 1208
Comment: typo
|
Deletions are marked like this. | Additions are marked like this. |
Line 9: | Line 9: |
* [[http://wingolog.org/archives/2007/11/27/reducing-the-footprint-of-python-applications|reducing the footpring of python applications]] | * [[http://wingolog.org/archives/2007/11/27/reducing-the-footprint-of-python-applications|reducing the footprint of python applications]] |
As Christian Heimes describes it here, Python uses its own memory allocator for small objects (< 257 bytes). Larger objects are allocated directly with malloc, smaller objects end up in arenas. The code is well documented in obmalloc.c.
Classes with a del method may create reference cycles. The GC can't break cycles when a del method is involved.
- keeping references to tracebacks, exception objects (except Exception, err) or frames (sys._getframe())
Related information: