[Ffmpeg-devel] [RFC] another attempt at memalign realloc
Thu Dec 7 18:11:41 CET 2006
Steve Lhomme said:
> Reimar D?ffinger wrote:
>> On Wed, Dec 06, 2006 at 09:38:51PM +0100, Michael Niedermayer wrote:
>>> On Wed, Dec 06, 2006 at 05:34:12PM +0100, Reimar D?ffinger wrote:
>>>> - return realloc(ptr - diff, size + diff) + diff;
>>>> + ptr2 = realloc(ptr - diff, size + 16) + diff;
>>>> + if(!((int)ptr2&15))
>>> hmm didnt this cast cause same silly warning with gcc on x86-64 or
>>> something, anyway long and int casts are mixed not a real issue though
>> The result of reusing code from other tries ;-)
>>>> + return ptr2;
>>>> + ptr = ptr2 - diff;
>>> void * arithmetic
>> Fixed, but most of the code actually is copy&paste from av_malloc, which
>> seems to use void * arithmetic, too...
> You can always replace/cast the void* to char*.
That's actually completely correct. Congratulations, Steve. Does this work
in MSVC too?
mru at inprovide.com
More information about the ffmpeg-devel