Hacker News new | ask | show | jobs
by bogomipz 2976 days ago
The author states:

>It is also possible to create an anonymous memory mapping that does not correspond to any files, being used instead for program data."

This isn't strictly true though is it? It was my understanding even mmap() MAP_ANONYMOUS used a file interface, and that the way the kernel creates anonymous maps is by creating an instance of /dev/zero in tmpfs. Although I believe the file descriptor might be ignored however.

1 comments

It seems to just pass around a null struct file pointer and special cases that.