best way to discover this process's current memory usage, cross-platform?
RalfGB
ralfgb at gmx.de
Thu Nov 17 15:24:48 EST 2005
Alex Martelli schrieb:
> MrJean1 <MrJean1 at gmail.com> wrote:
>
> > This may work on MacOS X. An initial, simple test does yield credible
> > values.
>
> Definitely looks promising, thanks for the pointer.
>
> > However, I am not a MacOS X expert. It is unclear which field of the
> > malloc_statistics_t struct to use and how malloc_zone_statistics with
> > zone NULL accumulates the stats for all zones.
>
> It appears that all of this stuff is barely documented (if at all), not
> just online but also in books on advanced MacOS X programming. Still, I
> can research it further, since, after all, the opendarwin sources ARE
> online. Thanks again!
>
>
> Alex
"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...
More information about the Python-list
mailing list