Skip to content
Permalink
Browse files Browse the repository at this point in the history
Problem: ZMTP v1 static allocator is needlessly resized
Solution: don't do it, resizing the shared allocator makes sense
as it can take the message buff for zero copy, but the static allocator
is fixed
  • Loading branch information
bluca committed May 8, 2020
1 parent 061ce6c commit 397ac80
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/decoder_allocators.hpp
Expand Up @@ -58,7 +58,8 @@ class c_single_allocator

std::size_t size () const { return _buf_size; }

void resize (std::size_t new_size_) { _buf_size = new_size_; }
// This buffer is fixed, size must not be changed
void resize (std::size_t new_size_) { LIBZMQ_UNUSED (new_size_); }

private:
std::size_t _buf_size;
Expand Down

0 comments on commit 397ac80

Please sign in to comment.