You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Santiago Gala <sg...@apache.org> on 2006/07/30 19:58:08 UTC

Re: Re: [rant] Memory options in VM -- why is the default not 'unlimited'

El dom, 30-07-2006 a las 00:16 +0100, Alex Blewitt escribió:

(...)

> However, if the GC is generational, why does it need to be contiguous?

Some (most?) implementations of write barriers for generational GC
assume that all old memory is below or above all nurseries, so that the
old->new test can be done with a simple address comparison.

So, while they are not fully contiguous, they make some assumptions on
memory layout, even if it is just for efficiency.

Testing if a pointer is inside any of a number of memory areas for each
assignment is a fairly expensive operation.

Regards
Santiago
-- 
VP and Chair, Apache Portals (http://portals.apache.org)
Apache Software Foundation

Re: Re: [rant] Memory options in VM -- why is the default not 'unlimited'

Posted by Mikhail Fursov <mi...@gmail.com>.
On 7/31/06, Santiago Gala <sg...@apache.org> wrote:
>
> El dom, 30-07-2006 a las 00:16 +0100, Alex Blewitt escribió:
>
> (...)
>
> > However, if the GC is generational, why does it need to be contiguous?
>
> Some (most?) implementations of write barriers for generational GC
> assume that all old memory is below or above all nurseries, so that the
> old->new test can be done with a simple address comparison.
>
> So, while they are not fully contiguous, they make some assumptions on
> memory layout, even if it is just for efficiency.
>
> Testing if a pointer is inside any of a number of memory areas for each
> assignment is a fairly expensive operation.
>

Extra bit/byte in object header can solve this problem..


-- 
Mikhail Fursov