27.4.6.1. mmap MAP_ANONYMOUS
Basic mmap
example, do the same as userland/c/malloc.c, but with mmap
.
Example: userland/linux/mmap_anonymous.c
In POSIX 7 mmap always maps to a file.
If we add the MAP_ANONYMOUS Linux extension however, this is not required, and mmap can be used to allocate memory like malloc.