best way to discover this process's current memory usage, cross-platform?
Fredrik Lundh
fredrik at pythonware.com
Thu Dec 1 14:01:16 EST 2005
mickie.liu at gmail.com wrote:
>> "mallinfo" is available on most UNIX-like systems(Linux, Solaris, QNX,
>> etc.) and is also included in the dlmalloc library (which works on
>> win32).
>>
>> There is a small C extension module at
>> http://hathawaymix.org/Software/Sketches/
>> which should give access to mallinfo() and thus byte accurate memory
>> usage information.
>>
>> I have to admit, that I did not tried it myself...
>
> I tried it, it doesn't work for dlmalloc.
> Got to find somewhere else.
dlmalloc supports the mallinfo API unless you compile it with the
NO_MALLINFO option. see the comments in the beginning of
the malloc.c file for details.
> Does any body know how to report correct memory usage if using dlmalloc
> package ?
make sure you have a dlmalloc that has mallinfo support enabled. when you've
done that, define "doesn't work for dlmalloc" (build problems, exceptions, crashes,
compiler errors, ... ???)
</F>
More information about the Python-list
mailing list