• Jon Dyte's avatar
    Experimental function zmq_recviov doesnt work correctly in a couple of cases · 56ead844
    Jon Dyte authored
    1) VSM - you cannot hand out the 'data' address as it was not allocated on the heap
    2) for other messages the 'data' address cannot be handed out either, as it not the address
    originally returned by malloc and hence cannot be passed to 'free'.
    see msg.cpp
    u.lmsg.content = (content_t*) malloc (sizeof (content_t) + size_);
    ....
    u.lmsg.content->data = u.lmsg.content + 1;
    
    So the function is changed to always malloc a data buffer and copy the data into it.
    There is a possible optimisation using memmove for the non-VSM case but that is not done yet.
    56ead844
Name
Last commit
Last update
builds Loading commit data...
cmake Loading commit data...
doc Loading commit data...
foreign/openpgm Loading commit data...
include Loading commit data...
perf Loading commit data...
src Loading commit data...
tests Loading commit data...
.gitignore Loading commit data...
.hgeol Loading commit data...
AUTHORS Loading commit data...
CMakeLists.txt Loading commit data...
COPYING Loading commit data...
COPYING.LESSER Loading commit data...
INSTALL Loading commit data...
MAINTAINERS Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
acinclude.m4 Loading commit data...
autogen.sh Loading commit data...
branding.bmp Loading commit data...
configure.ac Loading commit data...
installer.ico Loading commit data...
version.sh Loading commit data...