Mercurial > libavutil.hg
comparison mem.h @ 957:e34e8d654ded libavutil
Fix grammar errors in documentation
author | mru |
---|---|
date | Wed, 30 Jun 2010 15:38:06 +0000 |
parents | e461801687c9 |
children |
comparison
equal
deleted
inserted
replaced
956:2894d4c208dc | 957:e34e8d654ded |
---|---|
61 #else | 61 #else |
62 #define av_alloc_size(n) | 62 #define av_alloc_size(n) |
63 #endif | 63 #endif |
64 | 64 |
65 /** | 65 /** |
66 * Allocates a block of size bytes with alignment suitable for all | 66 * Allocate a block of size bytes with alignment suitable for all |
67 * memory accesses (including vectors if available on the CPU). | 67 * memory accesses (including vectors if available on the CPU). |
68 * @param size Size in bytes for the memory block to be allocated. | 68 * @param size Size in bytes for the memory block to be allocated. |
69 * @return Pointer to the allocated block, NULL if the block cannot | 69 * @return Pointer to the allocated block, NULL if the block cannot |
70 * be allocated. | 70 * be allocated. |
71 * @see av_mallocz() | 71 * @see av_mallocz() |
72 */ | 72 */ |
73 void *av_malloc(unsigned int size) av_malloc_attrib av_alloc_size(1); | 73 void *av_malloc(unsigned int size) av_malloc_attrib av_alloc_size(1); |
74 | 74 |
75 /** | 75 /** |
76 * Allocates or reallocates a block of memory. | 76 * Allocate or reallocate a block of memory. |
77 * If ptr is NULL and size > 0, allocates a new block. If | 77 * If ptr is NULL and size > 0, allocate a new block. If |
78 * size is zero, frees the memory block pointed to by ptr. | 78 * size is zero, free the memory block pointed to by ptr. |
79 * @param size Size in bytes for the memory block to be allocated or | 79 * @param size Size in bytes for the memory block to be allocated or |
80 * reallocated. | 80 * reallocated. |
81 * @param ptr Pointer to a memory block already allocated with | 81 * @param ptr Pointer to a memory block already allocated with |
82 * av_malloc(z)() or av_realloc() or NULL. | 82 * av_malloc(z)() or av_realloc() or NULL. |
83 * @return Pointer to a newly reallocated block or NULL if the block | 83 * @return Pointer to a newly reallocated block or NULL if the block |
85 * @see av_fast_realloc() | 85 * @see av_fast_realloc() |
86 */ | 86 */ |
87 void *av_realloc(void *ptr, unsigned int size) av_alloc_size(2); | 87 void *av_realloc(void *ptr, unsigned int size) av_alloc_size(2); |
88 | 88 |
89 /** | 89 /** |
90 * Frees a memory block which has been allocated with av_malloc(z)() or | 90 * Free a memory block which has been allocated with av_malloc(z)() or |
91 * av_realloc(). | 91 * av_realloc(). |
92 * @param ptr Pointer to the memory block which should be freed. | 92 * @param ptr Pointer to the memory block which should be freed. |
93 * @note ptr = NULL is explicitly allowed. | 93 * @note ptr = NULL is explicitly allowed. |
94 * @note It is recommended that you use av_freep() instead. | 94 * @note It is recommended that you use av_freep() instead. |
95 * @see av_freep() | 95 * @see av_freep() |
96 */ | 96 */ |
97 void av_free(void *ptr); | 97 void av_free(void *ptr); |
98 | 98 |
99 /** | 99 /** |
100 * Allocates a block of size bytes with alignment suitable for all | 100 * Allocate a block of size bytes with alignment suitable for all |
101 * memory accesses (including vectors if available on the CPU) and | 101 * memory accesses (including vectors if available on the CPU) and |
102 * zeroes all the bytes of the block. | 102 * zero all the bytes of the block. |
103 * @param size Size in bytes for the memory block to be allocated. | 103 * @param size Size in bytes for the memory block to be allocated. |
104 * @return Pointer to the allocated block, NULL if it cannot be allocated. | 104 * @return Pointer to the allocated block, NULL if it cannot be allocated. |
105 * @see av_malloc() | 105 * @see av_malloc() |
106 */ | 106 */ |
107 void *av_mallocz(unsigned int size) av_malloc_attrib av_alloc_size(1); | 107 void *av_mallocz(unsigned int size) av_malloc_attrib av_alloc_size(1); |
108 | 108 |
109 /** | 109 /** |
110 * Duplicates the string s. | 110 * Duplicate the string s. |
111 * @param s string to be duplicated | 111 * @param s string to be duplicated |
112 * @return Pointer to a newly allocated string containing a | 112 * @return Pointer to a newly allocated string containing a |
113 * copy of s or NULL if the string cannot be allocated. | 113 * copy of s or NULL if the string cannot be allocated. |
114 */ | 114 */ |
115 char *av_strdup(const char *s) av_malloc_attrib; | 115 char *av_strdup(const char *s) av_malloc_attrib; |
116 | 116 |
117 /** | 117 /** |
118 * Frees a memory block which has been allocated with av_malloc(z)() or | 118 * Free a memory block which has been allocated with av_malloc(z)() or |
119 * av_realloc() and set the pointer pointing to it to NULL. | 119 * av_realloc() and set the pointer pointing to it to NULL. |
120 * @param ptr Pointer to the pointer to the memory block which should | 120 * @param ptr Pointer to the pointer to the memory block which should |
121 * be freed. | 121 * be freed. |
122 * @see av_free() | 122 * @see av_free() |
123 */ | 123 */ |