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

Igor Stasenko siguctua at gmail.com
Fri May 7 08:52:49 UTC 2010


On 7 May 2010 08:47, Ang BeePeng <beepeng86 at yahoo.com> wrote:
>
>
> Ang BeePeng wrote:
>>
>>
>> Value pointed by tempPtr changed, before the next GC.
>>
>>
>
> Hi,
>
> Correction, as I follow, GC did touch the pointer and then update pointer at
> extraRoots, which is fine. But I couldn't follow every single GC, so when I
> let it runs, the value changed, sometime, somewhere.
>
> What is the limitation?

Simply just don't use oop directly, but always through pointer. This
will ensure that at any moment of time
you will access a valid oop , which can be used before next GC happens.

The operations which may trigger GC is following:
- creating a new object
- store pointer to another object, which currently belongs to old area

so, after one of such operation, make sure that you rereading oop
value from your root ptr, which you added using addGCRoot().



>
> Thanks.
>
> Ang Beepeng
> --
> View this message in context: http://forum.world.st/shared-object-between-main-exe-and-Squeak-dll-tp2023185p2133744.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