harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Blewitt" <alex.blew...@gmail.com>
Subject Re: Re: [rant] Memory options in VM -- why is the default not 'unlimited'
Date Sat, 29 Jul 2006 23:16:24 GMT
On 29/07/06, Salikh Zakirov <Salikh.Zakirov@intel.com> wrote:
> Salikh Zakirov wrote:
> > Sorry, the first version would lead to integer overflow and the to assertion
> > failure. The updated patch should work. It runs Hello on Windows/ia32 with a warning
> > about reducing maximum heap size to the virtual address range it could allocate.
> This is done because GC needs to have contiguous address range for the heap,
> and allocates virtual address range upfront.

It would seem that for an infinite amount of memory, attempting to
allocate a contiguous address range for the heap would be a problem.
It's also probably why other VMs have the -Xmx option, and attempt to
obtain the range all in one go.

However, if the GC is generational, why does it need to be contiguous?
Why not allocate chunks per generation? Or, for that matter, why can't
it be split into pages/blocks of memory? That way, you wouldn't need
to attempt to allocate it all up front, but rather you could tack a
new page/block onto the end of the memory list. Obviously, there would
be special cases (like when allocating a large array that is greater
than the page/block size) but all of these problems have been solved
by filing systems in the past. I mean, it's not like creating a ZIP
file attempts to allocate a contiguous block of 256Mb and then fills
it up as files are added. (However, that is pretty much what happens
when you create a DMG on Mac OS X ...)

Incidentally, a very good book on file system design discusses the Be
Filing System (BFS) and it's available at

Note that I'm mostly asking these questions in an attempt to find out
why it can't be done, and/or how much would need to change to be able
to do something like this instead. I can imagine that if there were
some kind of page-on-demand memory obtaining, then you wouldn't need a
-Xmx parameter (unless you wanted it), and that you'd be able to deal
with this kind of DLL-in-the-middle problem that you saw on Windows.


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