]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
tools/rados: reduce rados put memory usage by op_size 7928/head
authorPiotr Dałek <piotr.dalek@ts.fujitsu.com>
Fri, 4 Mar 2016 13:43:09 +0000 (14:43 +0100)
committerPiotr Dałek <piotr.dalek@ts.fujitsu.com>
Mon, 7 Mar 2016 07:26:37 +0000 (08:26 +0100)
commit5810eb0f603f08f023dab63ee0e34e5aa110fcf2
treebd12d895ac9668b13589b5d52bb22a118a6cce86
parent7e95acb4943aefd0f85b30d60f1ca32213b8a487
tools/rados: reduce rados put memory usage by op_size

indata.append(char*, len) causes buffer "buf" to be physically copied
to new memory block. Make static buffer pointing to buf so we don't need
any intermediate copies. This reduces memory usage by op_size, and also
cpu usage by a bit (no memmove necessary).

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
src/tools/rados/rados.cc