On Wed, May 18, 2011 at 8:56 AM, Martin Sustrik <[email protected]> wrote:
> There are two scenarios even on that side. Either user asked for > allocating a bogus amount of memory, in which case returning ENOMEM is > sufficient. > > Or, user asked for allocating reasonable-sized message, however, > allocation failed because system is running low on memory. In this case > emergency measures would be more appropriate. > > It's not clear how to distinguish the two though. Like Paul suggested, the size of the requested allocation is a good hint. Asking for a 4GB message is different than asking for a 50byte one. I'd suggest anything over 1M can fail without indicating OOM. -Pieter _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
