[zeromq-dev] need to lower memory usage

Philip Dizon philipdotdev at gmail.com
Mon Jun 23 18:25:36 CEST 2014


Is it possible to set it ZMQ_MAX_SOCKETS for a czmq context object because
I'm getting an assert failure when I do a zmq_ctx_get?

 e.g.
    client->ctx = zctx_new();
    assert(client->ctx);

    int max_sockets = 256;
    zmq_ctx_set (client->ctx, ZMQ_MAX_SOCKETS, max_sockets);
    assert (zmq_ctx_get (client->ctx, ZMQ_MAX_SOCKETS) == max_sockets);



On Thu, Jun 19, 2014 at 4:05 PM, Pieter Hintjens <ph at imatix.com> wrote:

> You can lower the max sockets per context, before creating your first
> context. See zmq_ctx_set ().
>
> On Fri, Jun 20, 2014 at 12:39 AM, Philip Dizon <philipdotdev at gmail.com>
> wrote:
> > Hi,
> >
> > I noticed that just creating a new zmq context and socket bumps my memory
> > usage by 18MB, and this is a big problem on my embedded system which only
> > contains about 100MB.  I determined this by using top command and
> comparing
> > the difference in mem usage.
> > Is there any sort of option I can use to lower the memory usage?
> >
> > Thanks
> >
> > _______________________________________________
> > zeromq-dev mailing list
> > zeromq-dev at lists.zeromq.org
> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> >
> _______________________________________________
> 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/20140623/bd926ec3/attachment.htm>


More information about the zeromq-dev mailing list