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 | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.
participants (1)
-
Jim Magee