Causing system throw bad_alloc to discover possible failures

97 Views Asked by At

I want to discover (for debug purpose) any possible cause of memory failure of my C++ program. Should I limit the heap size? Should I infinite loop a dynamic memory allocation (new) until crash? i want to cause a bad_alloc error without throwing it manually in order to discover something i may not have noticed.

0

There are 0 best solutions below