[squeak-dev] Re: Image normalization

Bert Freudenberg bert at freudenbergs.de
Wed Sep 17 15:24:09 UTC 2008


Am 17.09.2008 um 17:10 schrieb Paolo Bonzini:

> Bert Freudenberg wrote:
>>
>> Am 17.09.2008 um 07:47 schrieb Paolo Bonzini:
>>
>>> Keith Hodges wrote:
>>>> I tried normalizing object
>>>> pointers to a known base address as a starting point.
>>> Changing the base address might make loading slower.
>>
>> Actually, it makes it faster.
>
> Yes, but that address might vary between systems.  I interpreted  
> Keith's
> sentence as "normalizing the base address to zero", not to something
> that is likely to be available the next time around.

You can give a desired address to mmap(). We might find one that is  
likely to work on all systems.

> If the VM saves the objects with the current base address, it would
> probably choose an address that is likely to be available the next  
> time
> around, but it might be different from what is under version control.
>
> Anyway, with direct object access (no OOP table) there is a  
> fundamental
> problem that makes diff encoding of images almost impossible.  If an
> object dies, everything after it is compacted and changes its address.
> If you have an OOP table, the objects are referenced through something
> that is never compacted, but if objects are accessed directly then  
> every
> pointer in the image is changing.


As long as the garbage collector does not change the order of objects,  
the vast majority of oops in a saved image will not change even in a  
direct-pointer model with a fixed base address. Also, I've been  
thinking about freezing the lower part of the object memory to speed  
up gc - it makes no sense to always trace from the very beginning when  
most of the objects there are never modified (classes etc.). Something  
like perm space in VW ...

- Bert -





More information about the Squeak-dev mailing list