Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Victor_Z_
Beginner
55 Views

tbbmalloc operator new should check new_handler's before throwing std::bad_alloc

0 Kudos
1 Reply
Victor_Z_
Beginner
55 Views

Oops, it seems like i didn't leave a message properly.

tbbmalloc's operator new and operator new[] overloads in src/tbbmalloc/proxy.cpp go straight to throwing std::bad_alloc if scalable_msize(sz) returns NULL. I have installed a new_handler using std::set_new_handler(handler), and I expect this handler to be called in the new operator when tbbmalloc has run out of memory.

This is an enhancement request for future versions of tbbmalloc.

Reply