Revision 4ae40685 libavutil/mem.c

View differences:

libavutil/mem.c
33 33
#include <malloc.h>
34 34
#endif
35 35

  
36
#include "avutil.h"
36 37
#include "mem.h"
37 38

  
38 39
/* here we can use OS-dependent allocation functions */
......
40 41
#undef malloc
41 42
#undef realloc
42 43

  
44
#ifdef MALLOC_PREFIX
45

  
46
#define malloc         AV_JOIN(MALLOC_PREFIX, malloc)
47
#define memalign       AV_JOIN(MALLOC_PREFIX, memalign)
48
#define posix_memalign AV_JOIN(MALLOC_PREFIX, posix_memalign)
49
#define realloc        AV_JOIN(MALLOC_PREFIX, realloc)
50
#define free           AV_JOIN(MALLOC_PREFIX, free)
51

  
52
void *malloc(size_t size);
53
void *memalign(size_t align, size_t size);
54
int   posix_memalign(void **ptr, size_t align, size_t size);
55
void *realloc(void *ptr, size_t size);
56
void  free(void *ptr);
57

  
58
#endif /* MALLOC_PREFIX */
59

  
43 60
/* You can redefine av_malloc and av_free in your project to use your
44 61
   memory allocator. You do not need to suppress this file because the
45 62
   linker will do it automatically. */

Also available in: Unified diff