[Python-bugs-list] [ python-Feature Requests-540952 ] Memory Usage Reporting
noreply@sourceforge.net
noreply@sourceforge.net
Tue, 09 Apr 2002 07:45:43 -0700
Feature Requests item #540952, was opened at 2002-04-08 12:01
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=355470&aid=540952&group_id=5470
Category: Python Interpreter Core
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Allan Crooks (amc1)
Assigned to: Nobody/Anonymous (nobody)
Summary: Memory Usage Reporting
Initial Comment:
I would personally like a way in Python to report how
many bytes of memory that the interpreter is using
(perhaps through the sys module)?
If this sort of mechanism is added, then it may allow
SoftReferences (a la Java) to be introduced, which
would definitely be useful for memory sensitive
caches...
----------------------------------------------------------------------
>Comment By: Allan Crooks (amc1)
Date: 2002-04-09 14:45
Message:
Logged In: YES
user_id=39733
Thanks for the response.
Rather than having an internal way of figuring out how much
memory is used, is there no external way that we can get
the OS to return how big the process is?
I know that it is less than elegant, and would have to have
different platform-dependent code to do this, but it is
still an idea. I know that Jython can quiz the VM to see
how much memory is being used, and I'll assume that you can
do that with different OS's as well...
----------------------------------------------------------------------
Comment By: Tim Peters (tim_one)
Date: 2002-04-08 16:38
Message:
Logged In: YES
user_id=31435
Allan, this isn't easy, so the cost/benefit ratio is high.
For the most part, Python gets memory from the system
malloc, and doesn't even try to keep track of it now; nor
has it any idea how much overhead (padding, control bytes)
the system malloc adds; nor is there a portable interface
to C's malloc for finding out such things.
Still, I agree it would be nice to have such things <wink>.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=355470&aid=540952&group_id=5470