O'Reilly logo

Advanced Mac OS X Programming: The Big Nerd Ranch Guide by Mark Dalrymple

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Buffered I/O

The system calls we have discussed here are generally called unbuffered I/O. There is a little bit of buffering that happens in the kernel, probably no more than a couple of disk blocks, so that a physical I/O is not performed for every byte read or written. But for the most part, what you read and write is what you get in terms of physical I/O. If you want to read in large chunks of data and process the data out of that buffer, you will have to do the work yourself: refilling the buffer when it gets low, remembering your place in the buffer, handling reading and writing, and so on. Not hard work, just tedious.

The Standard C I/O functions are known as buffered I/O. The library handles the details of buffer allocation I/O in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required