For further reading, I can't recommend enough this free book:
http://pages.cs.wisc.edu/~remzi/OSTEP/
It's fantastically well-written, yet detailed without being overwhelming.
http://pages.cs.wisc.edu/~remzi/OSTEP/
It's fantastically well-written, yet detailed without being overwhelming.
The correct approach is to use mmap with the MAP_ANON flag (Which interestingly isn't doesn't seem to be fully documented in the Linux documentation...)
Disclaimer: I'm definitely not an expert, I'm reading the book to learn.