Can I get the total memory usage of Python?
djw
donald.welch.nospam at hp.com
Fri May 23 11:41:15 EDT 2003
"Martin v. Löwis" wrote:
> Haigu wrote:
>
>> I'm embedding python in my program, and now I want to fully test my
>> program to check for memory leaks. So is there any way to know how much
>> memory is used by python?
>>
>> Also is there any way to know how many certain kind of objects are
>> allocated? say, how many intergers ?
>
> In the release build, you can only find out how many container objects
> you have, with gc.getobjects(). In the debug build, you can get a list
> of all objects, which you can traverse to count them by type.
>
> Regards,
> Martin
Isn't that gc.get_objects()?
/d/
More information about the Python-list
mailing list