tinyalloc
tinyalloc copied to clipboard
ta_alloc(0) leads to returning same non-NULL address twice
Calling ta_alloc(0)
and then another ta_alloc()
(of any size) appears to be returning the same address twice. Having two memory blocks sharing the same address is bad since there is no way for ta_free()
to know which to free.
ta_alloc(0)
should probably either return NULL
or behave the same as if ta_alloc(1)
was called.
@jlindgren90 Thank you very much for this and the other PR - I will take a look asap, but likely will take a little while for me to review & test this...