mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-27 11:06:52 +01:00
Increase size of zmq_msg_t to 64 bytes
Increasing it would have at least two benefits - * More messages would be 'VSM' messages, so it would reduce allocation overhead a bit. * Remove any chance of false sharing of things that are, by design, pushed by value onto a ypipe_t<msg_t> which is shared between two threads. The only downside I see is slightly increased memory consumption on memory constrained applications. - Full discussion of this rationale is part of issue #1295
This commit is contained in:
@@ -92,7 +92,7 @@ namespace zmq
|
||||
|
||||
// Size in bytes of the largest message that is still copied around
|
||||
// rather than being reference-counted.
|
||||
enum { msg_t_size = 48 };
|
||||
enum { msg_t_size = 64 };
|
||||
enum { max_vsm_size = msg_t_size - (8 + sizeof (metadata_t *) + 3) };
|
||||
|
||||
// Shared message buffer. Message data are either allocated in one
|
||||
|
||||
Reference in New Issue
Block a user