great...that is what I was trying to confirm :-) Thanks Pieter!
" So zmq has to somehow copy the VSM before the message variable goes out
of scope. Just want to confirm that zmq does that."
On Mon, Mar 11, 2013 at 2:13 AM, Pieter Hintjens wrote:
> Very small messages (under 30 bytes at present)
Very small messages (under 30 bytes at present) are copied around
rather than referenced.
-Pieter
On Mon, Mar 11, 2013 at 8:04 AM, Mohit Jaggi wrote:
> Hmm...but messages are not sent in the context(I don't mean zmq context
> here) of the calling thread, right? So, how can one use stack variable
Hmm...but messages are not sent in the context(I don't mean zmq context
here) of the calling thread, right? So, how can one use stack variable for
message object?
On Sun, Mar 10, 2013 at 11:08 PM, Pieter Hintjens wrote:
> On Mon, Mar 11, 2013 at 12:39 AM, Mohit Jaggi
> wrote:
>
> > I understan
On Mon, Mar 11, 2013 at 12:39 AM, Mohit Jaggi wrote:
> I understand, but the caller does not control if the message is stored in
> VSM or on heap(since choice is made inside zmq code). So zmq has to somehow
> copy the VSM before the message variable goes out of scope. Just want to
> confirm that
I understand, but the caller does not control if the message is stored in
VSM or on heap(since choice is made inside zmq code). So zmq has to somehow
copy the VSM before the message variable goes out of scope. Just want to
confirm that zmq does that.
Or is it not OK to use zmq_msg_t on stack and it
On Thu, Mar 7, 2013 at 2:46 AM, Mohit Jaggi wrote:
> still trying to get to the bottom of this..appreciate any help. Especially
> want to know how the VSM data is handled.
The VSM data is a block of memory inside the zmq_msg_t structure, so
usually allocated on the stack.
-Pieter
__
still trying to get to the bottom of this..appreciate any help. Especially
want to know how the VSM data is handled.
On Mon, Mar 4, 2013 at 10:59 AM, Mohit Jaggi wrote:
> This is not fully full but more detailed...'buf' is on stack (so
> destructor will be called) and 'm' is on heap(and I havn'
This is not fully full but more detailed...'buf' is on stack (so destructor
will be called) and 'm' is on heap(and I havn't called delete...should I?).
I want to understand how zmq treats them.
context_t ctx(1);
socket_t *publisher;
void init() {
publisher = new socket
publisher.bind(...)
Hi Mohit,
Can you provide a full example?
-Pieter
On Mon, Mar 4, 2013 at 8:34 AM, Mohit Jaggi wrote:
> Hi,
> I am a little confused about how messages and buffers are handled in zmq. In
> the following example, valgrind finds a message leak for 'm'.
> 1) Should I call delete for 'm' after the
Hi,
I am a little confused about how messages and buffers are handled in zmq.
In the following example, valgrind finds a message leak for 'm'.
1) Should I call delete for 'm' after the send?
2) zmq will keep the buffer(data) but free memory for 'm' if I do this?
3) What about 'topic'? It is on stac
10 matches
Mail list logo