... unless the file is too big to fit into memory, in which case it
gets paged in, swapped out, and paged back in again -- highly
non-optimal.
The mmap trick looks like it's one technique that could be used to
impliment a Linux copy_file call, rather than a complete substitute
for such a call.
It would be nice to implement such a thing, if only because as it
currently stands this looks like about the only area where NT has a
potential performance advantage over Linux. That just won't do!
-- John Kodis.