cooperative-computing-lab/cctools — pull request #609 by batrick (2014-11-12 20:41:27+00:00)
Title: Chirp RPC Cleanup

Use common I/O and output buffers for all RPCs.

The common I/O buffer:

+ void *buffer = xxmalloc(MAX_BUFFER_SIZE); /* general purpose temporary buffer */

is allocated once and used for all I/O RPC. We no longer repeatedly reallocate
a buffer for pwrite/pread/etc.

The output buffer for RPCs is now in a buffer_t. Most RPC now use this for
"extra" output (e.g. pread) instead of allocating memory on the heap each time.

There is also other smaller cleanup such as using fewer variables on the stack,
better variable scoping, and consistent error handling. Also quite a few minor bugs have been fixed.