[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mmap and raw disk devices...
Hi,
On Thu, 2003-11-06 at 22:17, Lawrence Dickson wrote:
> If I set the buffer size over about 10 MB (that's 20 MB total for
> the double buffer, or 40 MB if you count each process's copy
> as separate) I soon get an incomplete write, followed (when I
> loop back to try writing the rest) by a perror of "Bad address".
"Bad address" (EFAULT) indicates that there's something wrong with the
write address, typically that it's outside the range of the mmap()ed
region.
> If
> instead of doing nothing I tried "memset" in the filler process, this
> used to be "Bus error".
SIGBUS normally indicates that you're accessing an area of an mmaped
region beyond the end of the file. Have you used "ftruncate" to extend
the mmaped files to be large enough for the whole mmap region?
--Stephen
--
Linux-mm-www: http://linux-mm.org/ website maintenance list
Archive: http://mail.nl.linux.org/linux-mm-www/
Development: linux-mm@kvack.org