diff --git a/libs/ardour/session_events.cc b/libs/ardour/session_events.cc index 309c7f93e7..22deeedac7 100644 --- a/libs/ardour/session_events.cc +++ b/libs/ardour/session_events.cc @@ -67,7 +67,13 @@ SessionEvent::create_per_thread_pool (const std::string& name, uint32_t nitems) a CrossThreadPool for use by this thread whenever events are allocated/released from SessionEvent::pool() */ - pool->create_per_thread_pool (name, sizeof (SessionEvent), nitems, [](size_t i, void*p) { std::cout << i << " " << *static_cast (p) << "\n";}); + pool->create_per_thread_pool (name, sizeof (SessionEvent), nitems, +#ifndef NDEBUG + [](size_t i, void*p) { std::cout << i << " " << *static_cast (p) << "\n"; } +#else + NULL +#endif + ); } SessionEvent::SessionEvent (Type t, Action a, samplepos_t when, samplepos_t where, double spd, bool yn, bool yn2, bool yn3) diff --git a/libs/pbd/pool.cc b/libs/pbd/pool.cc index d14507d9e6..e1269c2359 100644 --- a/libs/pbd/pool.cc +++ b/libs/pbd/pool.cc @@ -86,13 +86,12 @@ Pool::alloc () if (free_list.read (&ptr, 1) < 1) { PBD::stacktrace (std::cerr, 20); - if (_dump) { + printf ("RingBuffer write-idx: %u read-idx: %u\n", free_list.get_write_idx (), free_list.get_read_idx ()); void** _block = free_list.buffer (); for (size_t i = 0; i < free_list.bufsize (); ++i) { _dump (i, _block[i]); } - printf ("RingBuffer write-idx: %u read-idx: %u\n", free_list.get_write_idx (), free_list.get_read_idx ()); } fatal << "CRITICAL: " << _name << " POOL OUT OF MEMORY - RECOMPILE WITH LARGER SIZE!!" << endmsg;