Sebastien Tandel wrote:
I've taking a look at emem.c and it clearly doesn't attach information
about the chunk of memory being allocated. Then ep_realloc may only be
the "allocate new, copy" solution.
Without that information, how do you know how much to copy (if you don't
pass the old size explicitly, which would give it a different API from
other realloc routines)?
Arf ... I guess we're going to stay without ep_realloc :)
My other concern with building it into the API would be that it might
make people think that they could build up a big memory block by
extending one byte at a time, without realising that this would have a
massive memory footprint.
You're better off without it IMHO.