[zeromq-dev] OUT OF MEMORY on Win using inproc transport

Serg Gulko s.gulko at gmail.com
Wed Jan 18 21:32:10 CET 2012

 Yes, in this example I using constant size message(22 bytes) - I want keep
only one 22 bytes message.
Or I wrong?

On Wed, Jan 18, 2012 at 2:31 PM, Chuck Remes <cremes.devlist at mac.com> wrote:

> On Jan 18, 2012, at 12:41 PM, Serg Gulko wrote:
> Dear All!
> I facing some strange behaviour of zmq(version 2.1.11, complied using MSVC
> 2010, Windows 7 Home). Here is code example: http://pastebin.com/BJ5H8rct
> I setup PUB socket, set minimal HWM on it, started thread with
> SUB(subscribed on all messages) and start pushing data into PUB socket.
> After about 8 seconds(on my machine) I got OUT OF MEMORY error in
> src/yqueue.hpp at line 109.
> Then I decided to put some delays for PUB process between pushing messages
> and error is gone.
> Strange thing is that HWM set on PUB socket to keep only one message so I
> was expecting to loose all slow comers but definitely not get OUT OF MEMORY.
> Any ideas what is this and how to avoid such problems?
> Line 28 of your example code is wrong. It is not correctly setting a high
> water mark. It is probably reading garbage because you are getting the
> string length of the MESSAGE constant and using that as the option length.
>   zmq_setsockopt(intDataSocket, ZMQ_HWM, &messagesToStore, strlen(MESSAGE)
> );
> Fix that and try again.
> cr
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120118/7ae86e59/attachment.htm>

More information about the zeromq-dev mailing list