2865: reduce Keep memory usage.
authorTim Pierce <twp@curoverse.com>
Tue, 3 Jun 2014 20:53:50 +0000 (16:53 -0400)
committerTim Pierce <twp@curoverse.com>
Tue, 3 Jun 2014 20:57:27 +0000 (16:57 -0400)
commit70dd308c6d20951745d9b8e849131d0b14e7386a
treed7233c0b7b195b561aed31e3595db29d681676ac
parenta4378cd48648a9ca315713535f651d1bbace322f
2865: reduce Keep memory usage.

Eliminate ioutil.ReadAll to reduce unnecessary 2x memory allocations.

* PutBlockHandler allocates a buffer exactly as long as
  req.ContentLength and fills it with io.ReadFull.

* GetBlock uses ioutil.ReadFile (which it arguably should have been
  doing in the first place).

Refs #2865.
services/keep/src/keep/keep.go
services/keep/src/keep/volume_unix.go