Linux simply ignores the fd argument with MAP_ANONYMOUS, but some
other systems (I checked the FreeBSD man page) require that the
placeholder value be -1. Logically this makes sense because -1
is never a valid file descriptor, whereas 0 is the file descriptor
for standard input.
Linux simply ignores the fd argument with MAP_ANONYMOUS, but some other systems (I checked the FreeBSD man page) require that the placeholder value be -1. Logically this makes sense because -1 is never a valid file descriptor, whereas 0 is the file descriptor for standard input.