chiark / gitweb /
journal-remote: avoid copying input data
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 12 Jul 2014 03:20:08 +0000 (23:20 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 16 Jul 2014 02:34:42 +0000 (22:34 -0400)
commit92b10cbccdeef3896f45dc340eb7779c78577ede
tree2d608289582584f30aa27f0b3079457fb2ce326e
parent874bc134ac6504c45e94174e37af13ff21a6bfe2
journal-remote: avoid copying input data

Instead of copying fields into new memory allocations, simply keep pointers
into the receive buffer. Data in this buffer is only copied when there is not
enough space for new data and a large chunk of the buffer contains old data.
src/journal-remote/journal-remote-parse.c
src/journal-remote/journal-remote-parse.h
src/journal-remote/journal-remote-write.c
src/journal-remote/journal-remote-write.h