Platform: Replace non throwing versions of new operator.

This change prevents inclusion of non throwing versions of the new operator from
the compiler standard library. On GCC, the non throwing version bring with it
some portion of the exception support code.
pull/5165/head
Vincent Coubard 2017-09-21 18:37:25 +01:00
parent 4de448142b
commit 017b8f0fc7
1 changed files with 10 additions and 0 deletions

View File

@ -1008,6 +1008,16 @@ void *operator new[](std::size_t count)
return buffer;
}
void *operator new(std::size_t count, const std::nothrow_t& tag)
{
return malloc(count);
}
void *operator new[](std::size_t count, const std::nothrow_t& tag)
{
return malloc(count);
}
void operator delete(void *ptr)
{
if (ptr != NULL) {