With truncate() the OS might not actually allocate the space leading to a SIGBUS if /dev/shm runs out of space when actually using the mmap. By using fallocate we ensure that once the SHM mmap is created it wont fail