[squeak-dev] Backing a Form with e.g. mmap() or shm

Eliot Miranda eliot.miranda at gmail.com
Thu Jun 23 17:41:36 UTC 2022

On Thu, Jun 23, 2022 at 10:28 AM Tony Garnock-Jones <
tonyg at leastfixedpoint.com> wrote:

> On 6/23/22 18:15, Eliot Miranda wrote:
> > Can you say more about your use case?
> I've been implementing the X11 protocol in pure Smalltalk and I want to
> use a little bit of FFI to shmget/shmat and use that to get the pixels
> over to the X server. At present XPutImage is working but flooding the
> server with XPutImage seems to run into a rate limit from time to time
> so it's not very usable. Best to switch to mmap/shm if I can.


So in this use including the header in the first page would be ok?  Would
the mapping be read-only from the perspective of the X server?  Do you need
shmget to be run via the FFI or would it be OK to invoke it implicitly as
part of a mapping allocation primitive?  Would it be better to create the
mapping via the FFI and provide the mapping to the allocation primitive?
How should the mapping be taken down?

Windows folks, how portable is this idea to other OS's, especially windows?
 (I'm guessing this is a standard facility on most leading OS's).  So would
it be worth evolving towards a cross-platform abstraction?

Would you be prepared to build the VM to test this?  Perhaps even generate
it from sources?  To what extent would you be able to collaborate with e.g.
Tom & myself in implementing this?

best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220623/3aabd80f/attachment.html>

More information about the Squeak-dev mailing list