Comment Re:sing for your supper (Score 1) 463
This isn't quite read it all in and write it out, it is smarter than that. Fault in page at a time into the filesystem page cache. Read byte at a time and write out (faulting in page at a time for the output file if not using stdout). The difference between this and the read it all in approach is that here you allow the kernel memory management code to maintain what parts of the file(s) need to be kept in memory versus what parts can be reclaimed.