"John D. Mitchell" wrote:
> >>>>> "Nathan" == Nathan Meyers <[EMAIL PROTECTED]> writes:
> [...]
> > The info from ps will be useless, but you can get a ballpark figure by
> > computing Runtime.totalMemory() - Runtime.freeMemory() (calling
> > Runtime.gc() before the computation should prevent dead objects from
> > skewing the statistics). This is still very rough: there's no data on
> > individual object memory use, but at least you'll get an idea of overall
> > use from your various approaches.
>
> Um, er, IIRC, doesn't HotSpot completely ignore the Runtime.gc() "hint"?
There's not guarantee than any VM will honor it (see the mushy language in
the javadoc), but the suggestion follows the do-no-harm principle: it can't
hurt and it might help :-).
Nathan
>
>
> Take care,
> John
>
> --
> jGuru.com -- Unleash the Guru Within!
> JavaWorld.com -- Share your Tips and Tricks!
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]