Wireshark-dev: Re: [Wireshark-dev] [PATCH][UPDATE] ptvcursor : one step further?

From: Sebastien Tandel <sebastien@xxxxxxxxx>
Date: Sun, 11 Mar 2007 21:57:02 +0100
Guy Harris wrote:
> Guy Harris wrote:
>
>   
>> So, no, I don't see any reason not to implement ep_realloc().
>>     
>
> ...unless it's impossible for ep_realloc() to find out the *existing* 
> size of the object being reallocated (malloc()/realloc() tend to attach 
> a header before the chunk of memory being allocated, so free() knows how 
> much to free, but, as there's no ep_free(), I don't think ep_malloc() 
> attaches such a header).
>   

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.

Regards,
Sebastien Tandel