OLD | NEW |
1 /* | 1 /* |
2 * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at> | 2 * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at> |
3 * | 3 * |
4 * This file is part of FFmpeg. | 4 * This file is part of FFmpeg. |
5 * | 5 * |
6 * FFmpeg is free software; you can redistribute it and/or | 6 * FFmpeg is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Lesser General Public | 7 * modify it under the terms of the GNU Lesser General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2.1 of the License, or (at your option) any later version. | 9 * version 2.1 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v | 42 #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v |
43 #define DECLARE_ASM_CONST(n,t,v) static const t attribute_used __attribut
e__ ((aligned (n))) v | 43 #define DECLARE_ASM_CONST(n,t,v) static const t attribute_used __attribut
e__ ((aligned (n))) v |
44 #elif defined(_MSC_VER) | 44 #elif defined(_MSC_VER) |
45 #define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v | 45 #define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v |
46 #define DECLARE_ASM_CONST(n,t,v) __declspec(align(n)) static const t v | 46 #define DECLARE_ASM_CONST(n,t,v) __declspec(align(n)) static const t v |
47 #else | 47 #else |
48 #define DECLARE_ALIGNED(n,t,v) t v | 48 #define DECLARE_ALIGNED(n,t,v) t v |
49 #define DECLARE_ASM_CONST(n,t,v) static const t v | 49 #define DECLARE_ASM_CONST(n,t,v) static const t v |
50 #endif | 50 #endif |
51 | 51 |
52 | |
53 #if AV_GCC_VERSION_AT_LEAST(3,1) | 52 #if AV_GCC_VERSION_AT_LEAST(3,1) |
54 #define av_malloc_attrib __attribute__((__malloc__)) | 53 #define av_malloc_attrib __attribute__((__malloc__)) |
55 #else | 54 #else |
56 #define av_malloc_attrib | 55 #define av_malloc_attrib |
57 #endif | 56 #endif |
58 | 57 |
59 #if (!defined(__ICC) || __ICC > 1110) && AV_GCC_VERSION_AT_LEAST(4,3) | 58 #if (!defined(__ICC) || __ICC > 1110) && AV_GCC_VERSION_AT_LEAST(4,3) |
60 #define av_alloc_size(n) __attribute__((alloc_size(n))) | 59 #define av_alloc_size(n) __attribute__((alloc_size(n))) |
61 #else | 60 #else |
62 #define av_alloc_size(n) | 61 #define av_alloc_size(n) |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 /** | 116 /** |
118 * Frees a memory block which has been allocated with av_malloc(z)() or | 117 * Frees a memory block which has been allocated with av_malloc(z)() or |
119 * av_realloc() and set the pointer pointing to it to NULL. | 118 * av_realloc() and set the pointer pointing to it to NULL. |
120 * @param ptr Pointer to the pointer to the memory block which should | 119 * @param ptr Pointer to the pointer to the memory block which should |
121 * be freed. | 120 * be freed. |
122 * @see av_free() | 121 * @see av_free() |
123 */ | 122 */ |
124 void av_freep(void *ptr); | 123 void av_freep(void *ptr); |
125 | 124 |
126 #endif /* AVUTIL_MEM_H */ | 125 #endif /* AVUTIL_MEM_H */ |
OLD | NEW |