Replies: 1 comment
-
Yes, I can add a flag to each container that gets set when an internal malloc or realloc fails. It'll be up to the user to check the state of the flag with each container call (likely only at critical areas of flow, especially in embedded systems) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This looks like an awesome library.
If see no mention anywhere of what happens when (re)allocation fails. (I think this should be mentioned in the README).
Reacting to bad allocation is tricky (and often it consists of some clean up and then ending the program) . In C++, there's bad_alloc exception, one can catch if one chooses to do so. Is CTL going to just deference a null pointer any time a (re) allocation fails, or what's the best way to check allocation errors in case one would want to?
Beta Was this translation helpful? Give feedback.
All reactions