Date: Tue, 12 Mar 2002 23:18:43 -0800 From: Terry Lambert <tlambert2@mindspring.com> To: Alfred Perlstein <bright@mu.org> Cc: Farooq Mela <fmela0@sm.socccd.cc.ca.us>, freebsd-hackers@freebsd.org Subject: Re: Recv() to a mmap'ed file? Message-ID: <3C8EFD53.46D7EB1B@mindspring.com> References: <3C8E6CD5.67F23CF2@sm.socccd.cc.ca.us> <20020312214851.GK92565@elvis.mu.org> <3C8EEA50.C3E17315@sm.socccd.cc.ca.us> <20020313060553.GF32410@elvis.mu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Alfred Perlstein wrote: > > The file is already the required size. > > Gah... oops :) > > Have you tried the mapping with PROT_READ as well? I don't think > most arches allow for access without PROT_READ along with PROT_WRITE. Being the required size doesn't necessarily mean that it had indirect blocks allocated to the NUL filled region. He'd be much better off trying this with a file he created using "dd if=/dev/zero bsize=??? count=??? of=my_file" than something truncated to the expected size. Actually, he's be better still if he'd implement a "recvfile" to be the opposite end of a "sendfile". 8-). -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C8EFD53.46D7EB1B>