// Generate a shared memory name from the address of the shared_data:
char shmname[32]; // cannot be longer than PSHMNAMLEN = 31 on Mac OS X (shm_open raises ENAMETOOLONG otherwise)
snprintf(shmname, 31, "/shmalloc%p", &*data);
// Generate a shared memory name from the address of the shared_data:
char shmname[32]; // cannot be longer than PSHMNAMLEN = 31 on Mac OS X (shm_open raises ENAMETOOLONG otherwise)
snprintf(shmname, 31, "/shmalloc%p", &*data);