[Ffmpeg-devel] [RFC] another attempt at memalign realloc
Oded Shimon
ods15
Thu Dec 7 19:50:14 CET 2006
On Thu, Dec 07, 2006 at 07:05:55PM +0100, Reimar D?ffinger wrote:
> Actually, there is a rather obvious solution.
> Disadvantage: av_realloc without MEMALIGN_HACK now _always_ has the time
> and space costs of av_malloc.
...
> - return realloc(ptr, size);
> + p2 = av_malloc(size);
> + if (!p2) return NULL;
> + ptr = realloc(ptr, size);
> + if(!((long)ptr&15))
> + return ptr;
.... didn't you just loose p2?
I assume you meant to put the av_malloc line AFTER this line... ?
> [..]
- ods15
More information about the ffmpeg-devel
mailing list