summaryrefslogtreecommitdiff
path: root/src/ctx.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-02-22 16:23:36 +0100
committerMartin Sustrik <sustrik@250bpm.com>2011-02-22 16:23:36 +0100
commit43e8868875e1d5287979e5b9060a9b16be45cc79 (patch)
treed6df0587b107de28641b429048dff002e3c2387f /src/ctx.cpp
parent98ccff1a24a056aef15372b131eee1c1bf8f62ca (diff)
Added explicit error message in case of memory exhaustion
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/ctx.cpp')
-rw-r--r--src/ctx.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ctx.cpp b/src/ctx.cpp
index 84f9b03..953516a 100644
--- a/src/ctx.cpp
+++ b/src/ctx.cpp
@@ -43,21 +43,21 @@ zmq::ctx_t::ctx_t (uint32_t io_threads_) :
// internal log socket and the zmq_term thread the reaper thread.
slot_count = max_sockets + io_threads_ + 3;
slots = (mailbox_t**) malloc (sizeof (mailbox_t*) * slot_count);
- zmq_assert (slots);
+ alloc_assert (slots);
// Initialise the infrastructure for zmq_term thread.
slots [term_tid] = &term_mailbox;
// Create the reaper thread.
reaper = new (std::nothrow) reaper_t (this, reaper_tid);
- zmq_assert (reaper);
+ alloc_assert (reaper);
slots [reaper_tid] = reaper->get_mailbox ();
reaper->start ();
// Create I/O thread objects and launch them.
for (uint32_t i = 2; i != io_threads_ + 2; i++) {
io_thread_t *io_thread = new (std::nothrow) io_thread_t (this, i);
- zmq_assert (io_thread);
+ alloc_assert (io_thread);
io_threads.push_back (io_thread);
slots [i] = io_thread->get_mailbox ();
io_thread->start ();