Hi, As Martin encouraged me to fix zeromq in out of memory conditions. Here are first patches and first questions.
There are a lot of explicit and implicit (e.g. inserting in STL container) memory allocations in consturctors in zeromq code. As long as we are encouraged not to use exceptions in zeromq code, we can't gracefully propagate exceptions from there. So I see three options: 1. Refactor code to have all the memory allocations in `init()` method (other name?) 2. Allow throwing and catching exceptions in code which is not on critical path 3. Move memory allocation code to overriden `new` (which will probably turn it into a mess) BTW, if catching exceptions is discouraged at all, we need to rewrite all code which uses STL containers. Thoughs? -- Paul
0001-zmq_msg_init_data-returns-ERRNO-instead-aborting.patch
Description: Binary data
0003-Better-handling-of-memory-error-in-resolve_ip_hostna.patch
Description: Binary data
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
