[FFmpeg-devel] [PATCH] Add --malloc-prefix to apply a prefix to malloc, free etc

Måns Rullgård mans
Thu Jan 28 13:57:47 CET 2010

Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:

> On Wed, Jan 27, 2010 at 05:42:29PM +0000, Mans Rullgard wrote:
>> +#define malloc         AV_JOIN(MALLOC_PREFIX, malloc)
>> +#define memalign       AV_JOIN(MALLOC_PREFIX, memalign)
>> +#define posix_memalign AV_JOIN(MALLOC_PREFIX, posix_memalign)
>> +#define realloc        AV_JOIN(MALLOC_PREFIX, realloc)
>> +#define free           AV_JOIN(MALLOC_PREFIX, free)
>> +
>> +extern void *malloc(size_t size);
>> +extern void *memalign(size_t align, size_t size);
>> +extern int   posix_memalign(void **ptr, size_t align, size_t size);
>> +extern void *realloc(void *ptr, size_t size);
>> +extern void  free(void *ptr);
> Oh, and why all the extern suddenly? I thought we decided not to use that for
> function declarations?

Old habit I guess.  Thanks.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list