[Vm-dev] Immutability through hardware

Mariano Martinez Peck marianopeck at gmail.com
Mon May 9 13:30:47 UTC 2011


On Mon, May 9, 2011 at 2:16 PM, Igor Stasenko <siguctua at gmail.com> 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
>
> so, instead of adding a flag per object whether its immutable or not,
> and then check this flag every time there is a write attempt,
> we could simply let hardware handle this.
> And immutable space is a memory region with read-only access, So once
> placed & sealed , any attempt to write, we lead to a hardware
> exception,
> which can be nicely handled :)
>
> So, we will have a single entry point for all write access , and don't
> need to spread an immutability logic all over the places.
> And of course hardware 'check if memory is writeable' is much faster
> than software one.
>
> What you think?
>
>
Javier Pimas proposed me last month a very similar idea but for proxies
instead of immutable objects ;)


-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20110509/ac83ea8e/attachment.htm


More information about the Vm-dev mailing list