* Trent Nelson <[EMAIL PROTECTED]> [000527 11:44] wrote:
>
> Can someone explain to me why mmap() returns an address map you're
> prohibited from accessing if the fd argument represents a file that has
> just been created?
>
[snip incorrect use of mmap]
>
> Which is where my problem lies.
>
> Is it me, or mmap()? If it's me, is there any better way of doing what
> I want to do? (which is essentially allocating memory to be modified,
> then sync'd to a most probably newly-created file).
>
> From what I can see, the code works as it should in Linux.
Linux is wrong.
FreeBSD doesn't function as a crutch, you must use mmap() properly.
You must use ftruncate() to extend the file before you try to write
to an invalid area of the mmap().
--
-Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]]
"I have the heart of a child; I keep it in a jar on my desk."
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message