Re: mmap
Re: mmap
- Subject: Re: mmap
- From: Jim Magee <email@hidden>
- Date: Tue, 9 Jul 2002 12:27:54 -0400
On Tuesday, July 9, 2002, at 12:32 AM, Louis Demers wrote:
trying to port inn news server 2.3.3 to osx and the standard
distribution seems to have problems with a mmap call. A static data is
mmap to a file and then porperly written (I dumped all 130180 bytes to
a file and it's ok) but when unmapped, the file reverts to all zeros.
I checked and the file descriptor is opened with O_RDWR, the mmap is
done with PROT_WRITE|PROT_READ.
Did you set the MAP_SHARED flag?
How large was the file when you mapped it, and how much of it did you
map? By "properly written" do you mean that you modified all the files
pages in memory with store instructions? How much of it was modified
(up to but not beyond its current length)? Did you msync() your
changes or just munmap()?
When you say you "dumped all 130180 bytes to a file and it's OK", how
did you do that? Did you copy from the mapped file to another from
outside the program in question, or did you just issue a bunch of
write() calls from the mapped memory into the "dump file"?
More info is needed?
--Jim
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.
- Follow-Ups:
- Re: mmap
- From: Louis Demers <email@hidden>
References: | |
| >mmap (From: Louis Demers <email@hidden>) |