best way to discover this process's current memory usage, cross-platform?

mickie.liu at gmail.com mickie.liu at gmail.com
Thu Dec 1 19:46:32 CET 2005


RalfGB wrote:
> 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...

I tried it, it doesn't work for dlmalloc.
Got to find somewhere else.
Does any body know how to report correct memory usage if using dlmalloc
package ?

Thanks in advance.

Mickie




More information about the Python-list mailing list