[squeak-dev] FFI | ByteArrays: Authentic or Fabricated? :-)

Eliot Miranda eliot.miranda at gmail.com
Wed May 20 17:58:34 UTC 2020


> Hi Marcel,
> 
> On May 20, 2020, at 9:53 AM, Marcel Taeumel <marcel.taeumel at hpi.de> wrote:
> 
> 
> Hi, all!
> 
> 
> How can I figure out, whether the handle of an external object -- if it is a byte array -- was fabricated in the image or whether it is actually something creating in the external library? For actual instances of ExternalAddress, it is obvious that those are meant to point to external memory. But what about instances of ByteArray being stored in the "handle" instVar?
> 
> I tried Object >> #isPinned. :-D Did not work. I am looking at all the primitives in ByteArray.
> 
> ... is there actually a difference? Or are all byte arrays that I find in the image actually in the object memory?
> 
> All objects you can find in the image are either in object memory or are immediates (SmallInteger, Character or SmallFloat64).
> 
> Various objects can contain values that are pointers to external memory (ExternalAddress, Alien, ByteArray).
> 
> A pinned object is merely an object that is in old space (and will have been moved there by a become: on pinning if it was in new space) and, because it has the pinned hit set, will not be moved by the old space compactor.  Note that an object being pinned will not prevent it from being garbage collected if it is unreferenced.
> 
> Before I rabbit on irrelevantly can you say more about the issues you’re tackling?
> 
> 
> Best,
> Marcel
> 
> Cheers!
> Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200520/532e26c0/attachment.html>


More information about the Squeak-dev mailing list