[Gc] new() throws std::bad_alloc or return NULL ?

Christophe Meessen meessen at cppm.in2p3.fr
Sat May 12 01:55:51 PDT 2007


In C++ the new operator is supposed to throw std::bad_alloc exception in
case of memory allocation failure. Looking at gc_cpp.h it seems that
new() simply return GC_malloc output. AFAIK, one could assume that new()
would never return NULL and throw an exception instead.
What happens with libgc regarding this situation ?


More information about the Gc mailing list