Registered Member
|
I am currently writing code which should not be allocating memory dynamically. In order to ensure this is the case, I was thinking of defining the EIGEN_NO_MALLOC preprocessor directive.
However, on your page on preprocessor directives it clearly states;
Are there any caveats or runtime performance implications of using this macro? Aren't all the asserts static? |
Moderator
|
no performance penalty, but what do you prefer in the case a memory allocation occurs why you did not expected it? Do you prefer that your program crash because of the assert, or that your programme still perform the memory allocation?
|
Registered Member
|
Well, the ideal behaviour would be that it fails to compile, but that if it does compile it can never allocate. |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]