This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++ is having "out of memory" string
- From: bkoz <benjamin dot kosnik at gmail dot com>
- To: gcc at gcc dot gnu dot org, sanjeev dot moorthy at gmail dot com
- Date: Wed, 30 May 2007 12:19:05 +0200
- Subject: 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