[bind10-dev] logging and exception

Evan Hunt each at isc.org
Wed Jun 22 19:47:30 UTC 2011


> What should we do with this?
> 1. Ensure LOG_xxx never throws by not doing dynamic memory allocation
>    or not using throwing new, etc.  I'm afraid this is too costly and
>    makes the underlying implementation more complicated.
> 2. Similar to #1, but simply catch any exception from the logger and
>    ignore it:

I'd suggest doing #2 first, and think about #1 later.

ISTR reading somewhere that handling C++ exceptions imposes an significant
overhead cost even if you're ignoring them.  Dynamic memory allocation
can obviously do so as well.  So a non-throwing logging implementation
using static preallocated memory might be beneficial even if it adds
complexity, but it doesn't sound like a high priority.

                                        eh




More information about the bind10-dev mailing list