On Tue, Dec 8, 2009 at 5:07 PM, Adrian Lienhard <[email protected]> wrote:

>
> On Dec 8, 2009, at 12:08 , Mariano Martinez Peck wrote:
>
> > On Fri, Dec 4, 2009 at 12:05 PM, Adrian Lienhard <[email protected]>
> > wrote:
>
> > When you are creating your root of objects and you put symbols
> > inside, they
> > are not put in ourPointers but in ByteArray.
> > This is due to the fact that the only object who is pointing to that
> > symbol
> > is inside the segment ?
>
> To be precise, the symbols are also pointed to by the symbol table,
> but only by weak references. Since image segments use the GC mark
> logic, these pointers are not considered.
>

Ahhh ok. Now I see Symbol class >> rehash    where it sets to SymbolTable :=
WeakSet

Now...my finally question is, where in the code you can see the GC only mark
"normal" objects and that week objects are not being taken into account. Do
you know ?   I tried to search it but I didn't find it.

Thanks!!

Mariano


> > What you do with this piece of code:
> >
> >    symbolHolder := Symbol allSymbols.
> >
> > is to hold those symbols there. So, when ImageSegment uses the GC
> > techniques
> > to detect which objects are ONLY pointed from inside of the segment,
> > the
> > symbols is not found (because it is accessible trough that test) and
> > thus,
> > it goes to outPointers instead of ByteArray.
> >
> > And of course, if it is in outPointers instead of ByteArray when the
> > segment
> > is loaded again, yo don't create a symbol again but use the same
> > object (the
> > one of the oop).
> >
> > I am correct? or I understood anything ?
>
> yes.
>
> Cheers,
> Adrian
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to