mmap: is default non-populating behavior stable?

From: Eugene V. Lyubimkin
Date: Mon Nov 03 2008 - 17:00:07 EST


Hello kernel hackers!

The current implementation of mmap() in kernel is very convenient.
It allows to mmap(fd) very big amount of memory having small file as back-end.
So one can mmap() 100 MiB on empty file, use first 10 KiB of memory, munmap() and have
only 10 KiB of file at the end. And while working with memory, file will automatically be
grown by read/write memory requests.

Question is: can user-space application rely on this behavior (I failed to find any
documentation about this)?

TIA and please CC me in replies.

--
Eugene V. Lyubimkin aka JackYF

Attachment: signature.asc
Description: OpenPGP digital signature