configure shm at runtime