Problem: enormous memory increase due to zero copy decoding

The zero copy decoding strategy implemented for 4.2.0 can lead to a large
increase of main memory usage in some cases (I have seen one program go up to
40G from 10G after upgrading from 4.1.4). This commit adds a new option to
contexts, called ZMQ_ZERO_COPY_RECV, which allows one to switch to the old
decoding strategy.
This commit is contained in:
Stefan Kaes
2018-03-05 13:19:20 +01:00
parent d54633add1
commit fcbd2a5710
16 changed files with 112 additions and 17 deletions

View File

@@ -234,6 +234,9 @@ class ctx_t : public thread_ctx_t
// Is IPv6 enabled on this context?
bool ipv6;
// Should we use zero copy message decoding in this context?
bool zero_copy;
ctx_t (const ctx_t &);
const ctx_t &operator= (const ctx_t &);