Create a block of shared memory
void *PgShmemCreate( unsigned long size, char const *name );
This function creates a block of shared memory. The size argument determines the size of the block.
If you pass name as NULL, this function generates a unique name in the form Pg########; this is the preferred mode of operation. If you pass a name, make sure that it isn't already in use.
|You must use the “mx” form of a draw function to pass the shared memory reference. Otherwise, the data is copied into the draw event.|
The Photon library uses atexit() to arrange for PgShmemCleanup() to be called when your program terminates normally. If your program terminates abnormally, it should call PgShmemCleanup() explicitly.
A local pointer to shared memory. If an error occurs, it returns NULL and sets errno.
See the errors for shm_open() in the QNX Neutrino Library Reference.
PgDrawBitmapmx(), PgDrawImagemx(), PgShmemAttach(), PgShmemCleanup(), PgShmemDestroy(), PgShmemDetach()
shm_open() in the QNX Neutrino Library Reference