[Vm-dev] Re: [Pharo-dev] Immutability in the VM - is it hard?

Eliot Miranda eliot.miranda at gmail.com
Sun May 4 20:58:28 UTC 2014


Hi Alexandre,


On Sun, May 4, 2014 at 1:09 PM, Alexandre Bergel <alexandre.bergel at me.com>wrote:

> Why is immutability related to the memory management?
>

It isn't.


> Are you referring to the change in the header, therefore the garbage
> collector has to be aware of the extra bit?
>

The object representation needs to make room for the bit in the header, but
the GC ignores it completely.  However, the memory manager (of which the GC
is a component) implements the core of e.g. the become primitive and that
primitive can reasonably be expected to fail an attempt to become an
immutable object.


> Cheers,
> Alexandre
>
> Le 04-05-2014 à 12:05, Clément Bera <bera.clement at gmail.com> a écrit :
>
> Hello,
>
> Immutability needs to be implemented in the VM. It is quite some work on
> the current memory manager. Few people have enough skills to do this kind
> of changes nicely and efficiently, and none of them had enough time to do
> it. However, things are now moving quicker and quicker and some work and
> immutability has started.
>
> Right now part of the VM work is focusing the new memory manager Spur that
> will be released for Pharo 4. This new memory manager will feature
> immutability (1 bit in the object header is now reserved for this purpose).
> However, although immutability is required by some projects and people, it
> is quite far away on the To Do list right now (firstly, the new memory
> manager needs to work efficiently, be stable, be in production, ...).
> Therefore, you may have to wait for Pharo 5 (2 years from now) to have
> immutability in production.
>
> Best,
> Clement
>
>
> 2014-05-04 8:40 GMT-07:00 Aaron Rosenzweig <aaron at chatnbike.com>:
>
>> Hello,
>>
>> Why is the concept of “immutability” special to VisualWorks? Is it
>> something hard to add to other Smalltalk dialects such as Pharo or are
>> there other reasons for not having it?
>>
>> When I read the docs for the GOODS database client it says the following:
>>
>> “The GOODS client uses this immutability support for change detection.”
>>
>> It goes on to say that this is only for VisualWorks. For Pharo it says
>> that it is generally slow to commit changes because the client to the OODB
>> has to spent extra time detecting change detection. I guess for VisualWorks
>> it is basically “free” to detect a change in an object.
>>
>> Thank you,*Aaron Rosenzweig* / Chat 'n Bike <http://www.chatnbike.com>
>> *e:*  aaron at chatnbike.com  *t:*  (301) 956-2319   [image: Chat 'n Bike]  [image:
>> Chat 'n Bike]
>>
>>
>


-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20140504/694c0115/attachment.htm


More information about the Vm-dev mailing list