harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dalibor Topic <robi...@kaffe.org>
Subject Re: [rant] Memory options in VM -- why is the default not 'unlimited'
Date Tue, 01 Aug 2006 15:27:17 GMT
On Tue, Aug 01, 2006 at 10:39:03PM +0800, Xiao-Feng Li wrote:
> On 8/1/06, Gregory Shimansky <gshimansky@gmail.com> wrote:
> >There is a method Runtime.freeMemory() which returns the memory available 
> >in
> >the heap. I wonder what it should return when there is no limit.
> >
> >Some applications may rely on the value which this method returns. Just
> >returning Long.MAX_VALUE may lead to confusion.
> >
> 
> It can simply returns the freeMemory available to the Java object
> allocation, if that's programmer wants.
> 
> Basically I think this API is only for profiling hints purpose,
> meaning it has no guarantee about the real memory situation. So it's
> not recommended to program the application depending on its return
> value.

That's correct, afaict. Kaffe does not limit per default the amount of
memory available, allowing the gc to grow the heap as necessary. That
used to confuse some older Eclipse releases, but the bug has been fixed
in Eclipse.

cheers,
dalibor topic

> 
> Thanks,
> xiaofeng
> 
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> 

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message