Re: functions order when do memory mapping
- From: Måns Rullgård <mru@xxxxxxxxxxxxx>
- Date: Sun, 24 Dec 2006 16:11:41 +0000
Ronald <followait@xxxxxxx> writes:
A:
open
mmap
munmap
close
or
B:
open
mmap
close
munmap
Both works well, I wonder which is better?
It doesn't matter in general. The only time it could possibly matter
is if the file is deleted while open and/or mapped. In both cases,
the OS keeps reference counts on the inode so everything works.
--
Måns Rullgård
mru@xxxxxxxxxxxxx
.
- Follow-Ups:
- Re: functions order when do memory mapping
- From: Ronald
- Re: functions order when do memory mapping
- References:
- functions order when do memory mapping
- From: Ronald
- functions order when do memory mapping
- Prev by Date: [fixed] Re: functions order when do memory mapping
- Next by Date: Re: open problem
- Previous by thread: [fixed] Re: functions order when do memory mapping
- Next by thread: Re: functions order when do memory mapping
- Index(es):
Relevant Pages
|