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

Eliot Miranda eliot.miranda at gmail.com
Thu Mar 30 20:41:29 UTC 2023


Hi Lawson,

     what’s your energy level and engineering budget for this?  The best solution to choose at this point is the one you will complete.  There is a high-quality solution that will likely take significant effort but be really powerful, and that is to create a segment of the Spur memory manager that is shareable between images.  This has several interesting design issues I can think of up front:

The segment either includes a single non-pointer object or several non-pointer objects.  As Dave says these must be pinned and can’t be gc’ed.  There either needs to be a primitive to allocate the segment, and a variation on the new: primitive to allocate an object or multiple objects within it, or a primitive to allocate an object and a segment at the same time.  I don’t know which is best.

The segment is clearly special and must be handled specially by the segment manager; it presumably must only be freed & unmapped by a special primitive.

If you have the energy and the guesstimated one to two months required to implement such a thing I’d happily mentor you; you’d need to learn the simulator etc.

_,,,^..^,,,_ (phone)

> On Mar 29, 2023, at 12:11 PM, LawsonEnglish <LEnglish5 at cox.net> wrote:
> 
> I decided to do a strange, but potentially very nifty thing, and share memory between two or more squeak applications on the Mac, but I find I can’t even get started…
> 
> What I’d like to do is manually set the pointer for a Bitmap in Image A so that it points to the same shared memory as the BitMap in Image B (and C and D and…)
> and then display the Image Bitmap while B (C, etc) asynchronously draw into the same shared memory.
> The immediate usecase would be doing a multi-process Mandelbrot Set drawing app where the Image A is for display and menu selection while the remaining Images 
> do the calculations and setting of pixels.
> Is this doable out-of-the-box in Squeak, or must I write a plugin first?
> If so, what do I need to do?
> 
> If I do need to write a plug-in, how do I do it. I’ve read on the wiki about the Surface Plugin, but not quite sure if that is what I need or not.
> 
> Thanks.
> 
> 
> L
> 


More information about the Squeak-dev mailing list