| [eigen] patch to throw std::bad_alloc | 
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
| After discussion in IRC, I have written and attached a patch to
Memory.h to throw std::bad_alloc when ei_aligned_malloc() fails to
allocate memory.  If exceptions are disabled, ei_aligned_malloc()
should behave exactly as it did before.  I haven't actually been able
to compile this code due to problems with my machine here at work, so I
would appreciate someone testing it for me.  Also, if there are any unit tests
that test the behavior of ei_aligned_malloc(), they may need to be
altered since its behavior is now different if compiled with
exceptions on.  I don't know how Eigen structures its unit tests, but I
know most test suites I've used have some way to verify that a particular exception was or was not thrown. -Kenny Riddile | 
Attachment:
Memory_h.patch
Description: Binary data
| Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |