re animation with xputimage in article whaley apr sigma kpc com whaley sigma kpc com ken whaley writes one advanage of mit shm is that if your images are large you don t end up growing the size of the server process to hold them correct most x servers use a version of malloc which will not return memory to the os ie the x server might free a pixmap but the heap does not shrink one disadvantage of the mit shm is that in its sample implementation there is no provision for elegantly cleaning up the shared memory segments if the client dies a sudden violent death e g kill you have to be mindful of cluttering up the system with zombie shared memory segments well part of the routines i mentioned do a dirty little trick to get around that problem first i create the shared memory segment attach the client attach the x server and then remove the segment if you read the man pages on removing of shared memory segments you will see that the segment only dies after all attachments are gone now if the client dies that s one attachment gone the os cleans up for you and since the x server notices the client has dies frees up it s resources including detaching from the segment there goes the last attachment no more shared memory segment terrible but it works regards richard gooch
