"zero-copy" raw_decoder
A memcpy is eliminated when receiving data on a ZMQ_STREAM socket. Instead of receiving into a static buffer and then copying the data into the buffer malloced in msg_t::init_size, the raw_decoder allocates the memory for together with the reference-counter and creates a msg_t object on top of that memory. This saves the memcpy operation. For small messages, data is still copied and the receive buffer is reused.
Showing
src/decoder_allocators.cpp
0 → 100644
src/decoder_allocators.hpp
0 → 100644
Please
register
or
sign in
to comment