[ Web Proxy ]
URL:
Viewing: https://wiki.python.org/moin/../python/platforms/MacPython/../../testing/../archive/FreeMemory.html [Back]  [Original]

Free Memory - Python Wiki
Python Wiki
psf/wiki 0 0
Copy page

Free Memory

Legacy Wiki Page

This page was migrated from the old MoinMoin-based wiki. Information may be outdated or no longer applicable. For current documentation, see python.org.

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 cant break cycles when a [del] method is involved.

  • keeping references to tracebacks, exception objects (except Exception, err) or frames (sys._getframe())

Related information:

Back to top

Web Proxy Viewer  |  New URL  |  Original Page