Re:Investigating the Performance Overhead of C++ Exceptions
by thedance on Tuesday February 11, 2020 @11:59PM
(#22305931)
bad_alloc doesn't just naturally spring into being. If you override operator new, your implementation may not use it (for example tcmalloc does not throw if it can't allocate, it logs a message and terminates the program). Many systems of the type you mention, embedded control systems and the like where correctness actually matters, don't use new and delete anyway. They often use placement new with space statically allocated at program startup. These are the same kinds of projects that often decide to not use exceptions.
[ Parent
| on HN ]
There are no comments on this comment yet.