embedded python -memory usage-by-types

Jeff Collins jcollins at endtech.com
Thu Jan 4 11:45:39 EST 2001


On Wed, 3 Jan 2001, Warren Postma wrote:

> A while back there was someone working on a memory usage debugging hack.  Is
> anybody still working on this.
> 
> Output could be something like this:
> 
> 
> Object                  Instances             Memory Usage (kb)
> ---------               -------------       ---------------------
> String                       5000                 1100 kb
> Interned Strings        900                    500 kb
> Integer                     8000                  900 kb
> Classes                    900                     400 kb
> Instances                 1200                   1800kb
> ...
> ...

I like this idea and would like to see it as part of a more comprehensive
approach to resource management.  This is particularly important for small
platforms, where resources are often near exhaustion.  It would report
not only per/type/object useage, but also internal python memory usage
as well.  Making this information accessible at runtime would allow the
ability to recover unused resources allocated by Python (eg, free_list)
when memory is low.

> Has anyone implemented something like this?  Anything more advanced either?

I'll be glad to help with this.


-- 
Jeffery D. Collins, Ph.D.
Sr. Software Developer
Endeavors Technology, Inc.





More information about the Python-list mailing list