This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
_set_new_handler vs. set_new_handler
- From: "Lindner Bernhard" <Bernhard dot Lindner at Micronas dot com>
- To: <libstdc++ at gcc dot gnu dot org>
- Date: Thu, 25 Aug 2005 17:32:50 +0200
- Subject: _set_new_handler vs. set_new_handler
Hi out there!
I tried to implement an out-of memory-handler taken from an MSVC++
program. This handler is installed using the set_new_handler(). I
checked for a _set_new_handler() function in the GCC std lib but I
couldn't find one. The set_new_handler() function seems to be very
similar but it only installs "void f();" functions. The MSVC++ version
is able to install "int f(size_t);" type functions returning an integer
which is used by my out-of-memory handler to tell the std lib to retry
the failed memory allocation.
Is it possible to implement such a retry-alloc-mechanism using the GCC
std lib?
--
Regards, Bernhard