harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiao-Feng Li" <xiaofeng...@gmail.com>
Subject Re: [rant] Memory options in VM -- why is the default not 'unlimited'
Date Tue, 01 Aug 2006 14:39:03 GMT
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


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

View raw message