This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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]

Re: libstdc++ is having "out of memory" string


I am getting "out of memory" strings error log of our product. It
seems that error message "out of memory" doesn't have our common error
format.

This is most probably coming from:


include/backward/defalloc.h

where:

template <class _Tp>
inline _Tp* allocate(ptrdiff_t __size, _Tp*) {
   set_new_handler(0);
   _Tp* __tmp = (_Tp*)(::operator new((size_t)(__size * sizeof(_Tp))));
   if (__tmp == 0) {
	cerr << "out of memory" << endl;
	exit(1);
   }
   return __tmp;
}


This function, and this file, are deprecated. It is recommended that you use std::allocator instead.

-benjamin


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