Closed edlongman closed 1 year ago
You are right, I don't know what I was thinking. Fixed in https://github.com/dvidelabs/flatcc/commit/b2125775fdec2f5a4cba7ad569ea0186adf45e70
I plan to make a release soon, so it will be in there.
I also fixed FLATCC_ALIGNED_ALLOC which is used when you are not able to use malloc. https://github.com/dvidelabs/flatcc/commit/6c3fe816205e25487d5320e755f91080bc57621b
Thanks, I didn't need it to work as I didn't need the aligned alloc it just so happened that I stumbled upon it because of a misconfiguration of my heap size as well as using finalize_aligned
I am am compiling and running flatcc on a dsPIC using the XC16 compiler and generally having success with very minor tweaks.
When calling
finalize_aligned_buffer
it uses the__portable_aligned_alloc
implementation but whenmalloc
cannot assign the space and it returns nullptr, the alloc does not, instead returning4
Perhaps there should be a check here to see if malloc fails