[FFI] Pointer arithmetic impossible on ByteArray?

nicolas cellier ncellier at ifrance.com
Sat May 20 00:49:47 UTC 2006


Le Samedi 20 Mai 2006 02:30, Andreas Raab a écrit :
> Not a chance. The "base address" of an object isn't constant; the object
> will be moved by a GC and therefore you simply can't guarantee that "foo
> baseAddress" is a meaningful value for any period of time other than  in
> the primitive call itself (even the return from the primitive could
> cause a process switch, which could cause GC somewhere, which could move
> the object, which invalidates the base address).
>
> Cheers,
>    - Andreas

Of course, i want it in a primitive to avoid this kind of problem.
Is a plugin immune to that kind of moving GC ?

Nicolas




More information about the Squeak-dev mailing list