in reply to sysread/syswrite and O_DIRECT alignment problem

The main conflict is the line in Sys::Mmap that reads
    SvLEN_set(var, slop);
and in the case of anonymous mappings, slop evaluates to 0. (With Devel::Peek this is really easy to see.) So the buffer allocated with mmap looks like
SV = PV(0x804cd38) at 0x8062500
         REFCNT = 1
         FLAGS = (PADBUSY,PADMY,POK,pPOK)
         PV = 0x40156000 "\0\0\0\0\0 . . . . "
         CUR = 4096
         LEN = 0
Perl then notices that the buffer is too small to contain the results of sysread(), and kindly reallocates the string for you, immediately before sysread().
The "fix" is to modify the Sys::Mmap module (perhaps call the modification Sys::Mmap-broken?), and change the offending line to
    SvLEN_set(var, 131072)
This however, causes numerous other test cases to break . . .