Memory does not get allocated with the MAP_ANONYMOUS and MAP_SHARED_VALIDATE flag in mmap() Memory does not get allocated with the MAP_ANONYMOUS and MAP_SHARED_VALIDATE flag in mmap() unix unix

Memory does not get allocated with the MAP_ANONYMOUS and MAP_SHARED_VALIDATE flag in mmap()


Looking at do_mmap in linux/mm/mmap.c (kernel version 5.9), MAP_SHARED_VALIDATE only seems to be supported for file-backed mappings (see the if (file) and else sections). I do not know if that is a bug or if it is intentional.

EDIT: I have submitted a bug report.