Is mmap() reliable in 1.3.x?

Robert L Krawitz (
Wed, 27 Sep 1995 11:21:33 -0400

I'm working on an improved memory copy routine for the kernel on the
Pentium (it uses the FPU fildq/fistpq instructions to almost double
the throughput). I've observed, however, that when I use RCS
(actually CVS, but this uses RCS to do its work) compiled to use mmap
rather the normal read/write calls, that I occasionally get some data
corruption at the very beginning or end of a page in the file that RCS

I can't find anything otherwise wrong in my routine. It works fine in
user mode, and it otherwise works fine in the kernel, but there
appears to be some weird interaction with mmap. I haven't had time
yet to try to reproduce it under other circumstances. I'm wondering
if mmap is considered reliable or not, so I know where and whether to
keep looking.


Robert Krawitz <>

Member of the League for Programming Freedom -- mail Tall Clubs International -- or 1-800-521-2512