Join GitHub today
avoid dynamic memory allocation during error handling #121
This pull request refactors the way the error handling API in rcutils works so that it does not use dynamic memory and there does not need an allocator in most cases and also should make it easier to use in real-time and high performance situations.
Overview of major changes:
Main migration issues:
These changes are annoying, but I think ultimately they're for the better. I considered keeping existing signatures and doing tick-tock, and that's an option of the macro's which take allocators, but not so for the get error string signature, since it needs to return the copy to the fixed sized string. I decided against doing it for the macros because it would require using a separate name for the new macros and because deprecating them is not easy in pure C.
I have a lot more changes up and down the stack due to these API changes, and I'll open pull requests for those once I get feedback on the proposed changes here.
/cc @serge-nikulin fyi