[Vm-dev] Immutability through hardware

Gerardo Richarte gera at corest.com
Mon May 9 13:23:10 UTC 2011

On 05/09/2011 09:16 AM, Igor Stasenko wrote:
> Just a follow-up to recent thread.
> Suppose that we have new object format which supports multiple memory regions.
> I.e.
> eden space
> old space
> pinned space
> ...
> and
> immutable space
interesting idea indeed!

no sure what immutable means, so I'm throwing here some thoughts.

Immutable means that the object (imm) can't change, does it mean they
can't also move in space? (like, immutable implies pinned?). Not necessary
true, however if we have in mind the next question:

can immutable objects only refer other immutable/pinned objects?
otherwise when this other objects move the GC would need to update
the references, right? (including any class pointers)

    of course the GC could change the permissions of the page to update
this objects and then set it back to read only.

    other than this, I think the idea is good, and together with
thorough exception
handling, it could simplify the logic in the VM. Do we have now
immutable objects?
do we need them? does Newspeak need immutable objects?


More information about the Vm-dev mailing list