Optimization: remove unnecessary buffer resizes on partial recvs
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 27 May 2017 15:54:30 +0000 (11:54 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 30 May 2017 16:39:26 +0000 (12:39 -0400)
commitb5eb6b46c4183a76db45d34efc13a3a5ec0caf49
tree5b4ee768307d6d4b99e079bf1024331742581620
parentafcd51d757db170072f6c569d754b4966a4935c5
Optimization: remove unnecessary buffer resizes on partial recvs

Using the dynamic buffer's size to express the current offset
results in unnecessary resized and re-zeroing of areas of the
buffer.

The reception buffer's size is now used to express the total
size of the expected incoming message. The offset can be inferred
from the "bytes_left_to_receive" variable and message size. It
also, arguably, makes the code simpler to follow.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/notification-thread-events.c
This page took 0.027131 seconds and 5 git commands to generate.