[squeak-dev] Re: shared object between main.exe and Squeak.dll

Igor Stasenko siguctua at gmail.com
Sat May 8 14:15:23 UTC 2010


On 8 May 2010 14:56, Ang BeePeng <beepeng86 at yahoo.com> wrote:
>
> Hi,
>
> thanks for your reply.
>
> I didn't see as you describe. I follow the pointer to that object that I
> wish to keep. For the first few GC cycle that I follow, the object has been
> moved, and yes, it is still the same object. That is, pointer in
> extraRoots[] still the same, oop might be different, but content of the
> object still the same.
>
> Then I allow VM to run on its own, without quit (no image save, I'm
> comparing within a single run). Then at some point of time, I look into
> object body, pointed by oop, which pointed by the pointer in extraRoots[].
> It changed. That is why I ask if the effect is temporary.
>
it may change depends on what you storing there, and where you changing it.
you can always overwrite an oop , held by extra root pointer by using:

*oopPtr = newOop.

or init it just once.. it depends on what you want to do with it.

I just said, that you should always access an object in following way:
[1] oop = *oopPtr;

and only then access its contents:

[2] interpreterProxy fetchPointer: 0 ofObject: oop

and between [1] and [2] there should be no operations which may cause GC,
otherwise, you need to do [1] again, to refresh oop value, before
attempting [2].

> Thank you so much for replying.
>
> Ang Beepeng
> --
> View this message in context: http://forum.world.st/shared-object-between-main-exe-and-Squeak-dll-tp2023185p2136072.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>
>



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list