Re: mmap: is default non-populating behavior stable?

From: Eugene V. Lyubimkin
Date: Tue Nov 04 2008 - 11:52:28 EST


Alan Cox wrote:
> On Tue, 04 Nov 2008 17:07:00 +0100
> Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>> [snip]
>> I'm not sure how POSIX speaks of this.
>>
>> I think Linux does the expected thing.
>
> I believe our behaviour is correct for mmap/mumap/truncate and it
> certainly used to be and was tested.
>
> At the point you do anything involving mremap (which is non posix) our
> behaviour becomes rather bizarre.

Thanks to all for answers. I have made the conclusion that doing "open() new
file, truncate(<big size>), mmap(<the same big size>), write/read some memory
pages" should not populate other, untouched by write/read pages (until
MAP_POPULATE given), right?

--
Eugene V. Lyubimkin aka JackYF

Attachment: signature.asc
Description: OpenPGP digital signature