diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-07-11 23:20:08 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-07-15 22:34:42 -0400 |
commit | 92b10cbccdeef3896f45dc340eb7779c78577ede (patch) | |
tree | 2d608289582584f30aa27f0b3079457fb2ce326e /src/journal-remote/journal-remote-write.h | |
parent | 874bc134ac6504c45e94174e37af13ff21a6bfe2 (diff) |
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.
Diffstat (limited to 'src/journal-remote/journal-remote-write.h')
-rw-r--r-- | src/journal-remote/journal-remote-write.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/journal-remote/journal-remote-write.h b/src/journal-remote/journal-remote-write.h index 9c5a641d2e..aa381c661e 100644 --- a/src/journal-remote/journal-remote-write.h +++ b/src/journal-remote/journal-remote-write.h @@ -36,6 +36,7 @@ struct iovec_wrapper { int iovw_put(struct iovec_wrapper *iovw, void* data, size_t len); void iovw_free_contents(struct iovec_wrapper *iovw); size_t iovw_size(struct iovec_wrapper *iovw); +void iovw_rebase(struct iovec_wrapper *iovw, char *old, char *new); typedef struct Writer { JournalFile *journal; |