Because shared anonymous mappings (MAP_ANON could be used instead of
/dev/zero) are not implemented.
Use MAP_PRIVATE instead of MAP_SHARED and it succeeds of course, but
probably doesn't do what you want.
You best solutions are to use a temporary file instead of /dev/zero
(unlink it straight after opening if you like), or use shared memory
(shmget et al.).
-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/