Re: functions order when do memory mapping
- From: "Ronald" <followait@xxxxxxx>
- Date: Mon, 25 Dec 2006 07:13:44 +0800
"Måns Rullgård" <mru@xxxxxxxxxxxxx>
??????:yw1xzm9dl1du.fsf@xxxxxxxxxxxxxxxxxxxxxxxx
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.
If so, I think the 2nd is better.
.
- Follow-Ups:
- Re: functions order when do memory mapping
- From: Måns Rullgård
- Re: functions order when do memory mapping
- References:
- functions order when do memory mapping
- From: Ronald
- Re: functions order when do memory mapping
- From: Måns Rullgård
- functions order when do memory mapping
- Prev by Date: Re: PCI device driver question
- Next by Date: Re: functions order when do memory mapping
- Previous by thread: Re: functions order when do memory mapping
- Next by thread: Re: functions order when do memory mapping
- Index(es):
Relevant Pages
|