• Jens Auer's avatar
    Fixed wrong handling of shared messages · 51cb57e2
    Jens Auer authored
    The shared reference count was not shared but copied. msg_t cannot
    store the refcnt itsef but has to store a pointer to an externally
    allocated (shared) refcnter. The changes to lmsg are reverted to
    use content_t again. Howver, this introduces an allocation in v2_decoder
    when creating the message which can be avoided. When allocating the reception
    buffer, space is allocated for the maximum number of reference counts
    (8192 / max_vsm_size = 8192/64 = 128 zmq:atomic_counter objects). This
    increases the buffer by 128*sizeof(atomic_counter) = 128*4 = 512 bytes only.
    When creating a message, the refcnt member is set to the address of one of the
    pre-allocated atomic_counter_t objects. To do so, a new msg_t type zcmsg
    is introduced because msg::copy must discriminate between the message types
    when releasing memory.
    51cb57e2
Name
Last commit
Last update
builds Loading commit data...
doc Loading commit data...
include Loading commit data...
packaging/nuget Loading commit data...
perf Loading commit data...
src Loading commit data...
tests Loading commit data...
tools Loading commit data...
tweetnacl Loading commit data...
.gitignore Loading commit data...
.hgeol Loading commit data...
.travis.yml Loading commit data...
AUTHORS Loading commit data...
CMakeLists.txt Loading commit data...
COPYING Loading commit data...
COPYING.LESSER Loading commit data...
Dockerfile Loading commit data...
INSTALL Loading commit data...
MAINTAINERS Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README.cygwin.md Loading commit data...
README.md Loading commit data...
acinclude.m4 Loading commit data...
autogen.sh Loading commit data...
branding.bmp Loading commit data...
ci_build.sh Loading commit data...
configure.ac Loading commit data...
installer.ico Loading commit data...
version.sh Loading commit data...