[eigen] [patch] Aligned new/delete |
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
Two things are covered in this patch. 1. Each operator new needs its corresponding operator delete. This was not the case for in-place new/delete. 2. Operators new were declared with throw() which is not correct since in the current standard implementation they may throw std::bad_alloc. The throw() declaration was moved from new to delete which must never throw. 3. Added no-throw new/delete. In order to allow user using no-throw new and delete I just added them. The difference is that instead of throwing an exception they return 0 in case of an allocation failure. For the in-place new and delete I piped the calls to the global in-place new and delete functions since actually no allocation is performed. It is the job of the user to take care that when using in-place new and delete the memory is properly aligned. I ran the unit tests and all besides the new matrix exponential passed - could not submit to the dashboard since the daily limit is reached. Regards, Hauke
Attachment:
Memory.patch
Description: Binary data
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |