On 10/01/13 20:12, Dale Curtis wrote: > From: "Paweł Hajdan, Jr" <[email protected]> > > Memory passed to av_realloc cannot be allocated using memalign. > > From realloc(3): > > The realloc() function changes the size of the memory block pointed to > by ptr to size bytes. (...) Unless ptr is NULL, it must have been returned > by an earlier call to malloc(), calloc() or realloc(). >
The patch itself is fine (and queue locally), I'm trying to figure out what's the best to avoid such issues since few malloc implementation support aligned realloc. - in debug mode mark malloc and realloc memory differently and assert accordingly in realloc, and make quite clear we have 2 kinds of memory. - support aligned realloc (means wasting 8 bytes per allocation if we want to keep the same signature, or introduce av_realloc2 that takes in account the size to be preserved) I wouldn't consider making a variant of jemalloc or such to radically solve the issue. lu _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
