I'm a linux guy.  Here's what I do to get the memory of the
current ruby process:

IO.readlines("/proc/#{Process.pid}/status").grep(/VmSize/).display

Of course this is non-portable too.

I'd imagine to get a non-portable solution, you'd need
something in GC/ObjectSpace to figure out how much its objects
are taking up.

--- Stephen Kellett <snail / objmedia.demon.co.uk> wrote:

> In message
> <20050923031500.82696.qmail / web36108.mail.mud.yahoo.com>, 
> Eric Mahurin <eric_mahurin / yahoo.com> writes
> >In ruby, is there a portable way to measure memory usage? 
> Any
> >of these would be useful:
> 
> Not portable, but if you are using Windows you may want to
> take a look 
> at Ruby Memory Validator. No website description at the
> present time but 
> you can apply for the beta at http://www.softwareverify.com
> 
> Stephen
> -- 
> Stephen Kellett
> Object Media Limited   
> http://www.objmedia.demon.co.uk/software.html
> Computer Consultancy, Software Development
> Windows C++, Java, Assembler, Performance Analysis,
> Troubleshooting
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com