longhair
longhair copied to clipboard
Dynamic memory allocation
There are multiple places in the code where longhair does memory allocation. This is not desirable in a real time environment, because the "new" may take a long time.
Currently, the code has no state object that's passed around, so it has to do "new" calls every time. I would prefer if the library got a state in which memory is kept, so that is does not have to be alloc'ed/dealloc'ed every time it's used.
I hacked something together for my own purposes in https://github.com/MathijsV/longhair/commit/854d77dcda123302b43b405be49652ec66f177a1
Nice =)
I hope other people find it helpful