This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

_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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]