Add throw() to the nogrow new operator. This will cause the right version to be

used that handles NULL returns and doesn't expect an exception. This fixes that
certain constructors would still be called even if the allocation failed in low
memory situations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28208 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2008-10-17 08:32:42 +00:00
parent 6bda235a59
commit f7de7fa4e3
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ static const struct nogrow_t {
} nogrow = {};
inline void*
operator new(size_t size, const nogrow_t& nogrow)
operator new(size_t size, const nogrow_t& nogrow) throw()
{
return malloc_nogrow(size);
}