90 #if defined(__INTEL_COMPILER) && __INTEL_COMPILER < 1110 || defined(__SUNPRO_C) 91 #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v 92 #define DECLARE_ASM_CONST(n,t,v) const t __attribute__ ((aligned (n))) v 93 #elif defined(__TI_COMPILER_VERSION__) 94 #define DECLARE_ALIGNED(n,t,v) \ 95 AV_PRAGMA(DATA_ALIGN(v,n)) \ 96 t __attribute__((aligned(n))) v 97 #define DECLARE_ASM_CONST(n,t,v) \ 98 AV_PRAGMA(DATA_ALIGN(v,n)) \ 99 static const t __attribute__((aligned(n))) v 100 #elif defined(__GNUC__) 101 #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v 102 #define DECLARE_ASM_CONST(n,t,v) static const t av_used __attribute__ ((aligned (n))) v 103 #elif defined(_MSC_VER) 104 #define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v 105 #define DECLARE_ASM_CONST(n,t,v) __declspec(align(n)) static const t v 107 #define DECLARE_ALIGNED(n,t,v) t v 108 #define DECLARE_ASM_CONST(n,t,v) static const t v 131 #if AV_GCC_VERSION_AT_LEAST(3,1) 132 #define av_malloc_attrib __attribute__((__malloc__)) 134 #define av_malloc_attrib 152 #if AV_GCC_VERSION_AT_LEAST(4,3) 153 #define av_alloc_size(...) __attribute__((alloc_size(__VA_ARGS__))) 155 #define av_alloc_size(...) 208 if (!size || nmemb >= INT_MAX / size)
228 if (!size ||
nmemb >= INT_MAX / size)
299 void *
av_realloc_f(
void *ptr,
size_t nelem,
size_t elsize);
338 av_alloc_size(2, 3)
int av_reallocp_array(
void *ptr,
size_t nmemb,
size_t size);
403 void av_fast_malloc(
void *ptr,
unsigned int *size,
size_t min_size);
480 char *
av_strndup(const
char *s,
size_t len) av_malloc_attrib;
490 void *
av_memdup(const
void *p,
size_t size);
644 const uint8_t *elem_data);
665 static inline
int av_size_mult(
size_t a,
size_t b,
size_t *r)
670 if ((a | b) >= ((
size_t)1 << (
sizeof(
size_t) * 4)) && a && t / a != b)
void * av_realloc_f(void *ptr, size_t nelem, size_t elsize)
void av_max_alloc(size_t max)
#define av_malloc_attrib
Definition: mem.h:134
void * av_calloc(size_t nmemb, size_t size) av_malloc_attrib
size_t size
Definition: mem.h:207
void av_memcpy_backptr(uint8_t *dst, int back, int cnt)
av_warn_unused_result int av_dynarray_add_nofree(void *tab_ptr, int *nb_ptr, void *elem)
void * av_malloc(size_t size) av_malloc_attrib av_alloc_size(1)
#define AVERROR(e)
Definition: error.h:43
void * av_memdup(const void *p, size_t size)
void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size)
void av_fast_mallocz(void *ptr, unsigned int *size, size_t min_size)
void * av_fast_realloc(void *ptr, unsigned int *size, size_t min_size)
av_warn_unused_result int av_reallocp(void *ptr, size_t size)
char * av_strdup(const char *s) av_malloc_attrib
void * av_dynarray2_add(void **tab_ptr, int *nb_ptr, size_t elem_size, const uint8_t *elem_data)
void * av_realloc(void *ptr, size_t size) av_alloc_size(2)
#define av_warn_unused_result
Definition: attributes.h:58
#define av_alloc_size(...)
Definition: mem.h:155
void av_dynarray_add(void *tab_ptr, int *nb_ptr, void *elem)
size_t nmemb
Definition: mem.h:319
void * av_mallocz(size_t size) av_malloc_attrib av_alloc_size(1)
char * av_strndup(const char *s, size_t len) av_malloc_attrib