Add user-init function to shm_init to allow initializing a new shm file easily