Re: mmap bug?

From: Garrett Wollman <wollman_at_csail.mit.edu>
Date: Sun, 31 Jul 2005 18:39:29 -0400
<<On Sun, 31 Jul 2005 23:18:58 +0300, Giorgos Keramidas <keramida_at_FreeBSD.ORG> said:

> The bug seems to be elsewhere, namely to the fact that the filesystem
> code never realizes the file has changed size after I use mmap() to map
> a region beyond its current size and write past its current end.

You should not expect it to do that.  If you want to extend a file,
use ftruncate() before mapping it.  Anything written past the end of a
file should be discarded on last close.

-GAWollman
Received on Sun Jul 31 2005 - 20:39:32 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:40 UTC