[squeak-dev] Setting Memory pointer for bitmap object.. is it possible without plugin?

tim Rowledge tim at rowledge.org
Thu Mar 30 22:49:49 UTC 2023


If I'm remembering correctly the SurfacePlugin is intended to handle external bitmaps, ie memory not in the main object space. that would obviate the need to worry about pinning or GC issues.

The trick then would be to provide a way to access the external memory chunk from several processes. You *might* even want to use the HostWindowPlugin to open a separate window on that bitmap?

> On 2023-03-30, at 3:29 PM, LawsonEnglish <LEnglish5 at cox.net> wrote:
> 
> Thanks. I’ve used FFI before, and have several references to shared memory on the Mac (other OS’s have similar facilities). The real question is about setting a pointer to the memory used by a Bitmap object.
> 
> Getting FFI to work with the latest version of Mac OS X is often quite painful due to all the security-related hoops you must jump through to give  permission to an app to access libraries outside the app’s own set. I *think* that Apple’s built in shared memory API won’t be as covoluted to use via FFI as other libraries are, but haven’t tested it on Mac OS X 13.x (Ventura).
> 
> The real question is about setting the pointer that a Bitmap (in two or more images) uses. ELiot kindly offered to mentor me through the process of writing plugins. The real question is: am I up for that?
> 
> L
> 
>> 
>> 
>> Hi --
>> 
>> I would use SqueakFFI and through that interface a system library for memory shared between processes. Maybe through memory-mapped files or similar...
>> 
>> [URLS deleted to satisfy my malfunctioning ISP mailing system]
>> 
>> Once you have your ExternalAddress for that shared memory region, you can start reading and writing bytes from multiple Squeak images. Watch out for synchronization/locking etc.
>> 
>> Best,
>> Marcel
> 
> 


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: L: Lie!




More information about the Squeak-dev mailing list