
  There's documentation on how to use the shared memory extension in the
X11R5 distribution.

  Actually, I just finished writing a motif animation program...
(take-lots-of-image-data-and-display-it-pretty-darn-fast). When using
on-server pixmaps or shared memory, I had to insert a delay loop to keep
it from going too quickly :). Testing both methods side by side, they
were just about equal.

  The advantage of SHM is that your X server doesn't grow to ridiculous
sizes; but pixmaps can work over a network and *are* removed if your
application dies (one tends to use ipcrm manually quite a bit when
debugging SHM apps).

  Shared memory also has the problem that some operating systems (e.g.
Ultrix) seem to allow only a small number of segments (~6) to be
attached to a process at once; consequently, a redraw becomes
XShmAttach();XShmPutImage();XShmDetach(); on Dec systems. And Dec's 24
bit displays (like the ones I tend to use most often) don't seem to
support the extension (maybe someone compiled them wrong?), and using
pixmaps causes the X server to crash (failed mallocs), so one *has* to
use the local unix domain socket (which really isn't that bad; one
copies the info three times per redraw instead of one).

  In short: allowing all three forms of display, within the program is a
Good Thing (minus SHM if running over a network), and let the user pick
whatever feels fastest.

  (I just use an ximagehandler class and forget about it :)