Code samples from the Mac OS X Internals book