[lkml]   [2003]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Question about memory-mapped files
On Wed, 28 May 2003, John M Collins wrote:
> If I invoke mmap to map a file to memory, and it succeeds, can I safely
> close the original file descriptor and rely on the memory still being
> mapped and the file still updated (possibly with mysnc)?

Yes, that's definitely a part of the specification of mmap,
even if it's not mentioned on the man page.

Note that the file on disk is likely not to be updated until
some time after you unmap it, unless you use msync to force it.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:35    [W:0.080 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site