42 #if defined(__INTEL_COMPILER) && __INTEL_COMPILER < 1110 || defined(__SUNPRO_C)
43 #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v
44 #define DECLARE_ASM_CONST(n,t,v) const t __attribute__ ((aligned (n))) v
45 #elif defined(__TI_COMPILER_VERSION__)
46 #define DECLARE_ALIGNED(n,t,v) \
47 AV_PRAGMA(DATA_ALIGN(v,n)) \
48 t __attribute__((aligned(n))) v
49 #define DECLARE_ASM_CONST(n,t,v) \
50 AV_PRAGMA(DATA_ALIGN(v,n)) \
51 static const t __attribute__((aligned(n))) v
52 #elif defined(__GNUC__)
53 #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v
54 #define DECLARE_ASM_CONST(n,t,v) static const t av_used __attribute__ ((aligned (n))) v
55 #elif defined(_MSC_VER)
56 #define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v
57 #define DECLARE_ASM_CONST(n,t,v) __declspec(align(n)) static const t v
59 #define DECLARE_ALIGNED(n,t,v) t v
60 #define DECLARE_ASM_CONST(n,t,v) static const t v
63 #if AV_GCC_VERSION_AT_LEAST(3,1)
64 #define av_malloc_attrib __attribute__((__malloc__))
66 #define av_malloc_attrib
69 #if AV_GCC_VERSION_AT_LEAST(4,3)
70 #define av_alloc_size(...) __attribute__((alloc_size(__VA_ARGS__)))
72 #define av_alloc_size(...)
96 if (size <= 0 || nmemb >= INT_MAX / size)
123 void *
av_realloc_f(
void *ptr,
size_t nelem,
size_t elsize);
193 av_alloc_size(1, 2) static inline
void *av_mallocz_array(
size_t nmemb,
size_t size)
195 if (size <= 0 || nmemb >= INT_MAX / size)
281 if ((a | b) >= ((
size_t)1 << (
sizeof(
size_t) * 4)) && a && t / a != b)