#include "attributes.h"
Go to the source code of this file.
Defines | |
#define | DECLARE_ALIGNED(n, t, v) t v |
#define | DECLARE_ASM_CONST(n, t, v) static const t v |
#define | av_malloc_attrib |
#define | av_alloc_size(n) |
Functions | |
void * | av_malloc (unsigned int size) av_malloc_attrib av_alloc_size(1) |
Allocates a block of size bytes with alignment suitable for all memory accesses (including vectors if available on the CPU). | |
void * | av_realloc (void *ptr, unsigned int size) av_alloc_size(2) |
Allocates or reallocates a block of memory. | |
void | av_free (void *ptr) |
Frees a memory block which has been allocated with av_malloc(z)() or av_realloc(). | |
void * | av_mallocz (unsigned int size) av_malloc_attrib av_alloc_size(1) |
Allocates a block of size bytes with alignment suitable for all memory accesses (including vectors if available on the CPU) and zeroes all the bytes of the block. | |
char * | av_strdup (const char *s) av_malloc_attrib |
Duplicates the string s. | |
void | av_freep (void *ptr) |
Frees a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer pointing to it to NULL. |
void av_free | ( | void * | ptr | ) |
Frees a memory block which has been allocated with av_malloc(z)() or av_realloc().
ptr | Pointer to the memory block which should be freed. |
It is recommended that you use av_freep() instead.
void av_freep | ( | void * | ptr | ) |
Frees a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer pointing to it to NULL.
ptr | Pointer to the pointer to the memory block which should be freed. |
void* av_malloc | ( | unsigned int | size | ) |
Allocates a block of size bytes with alignment suitable for all memory accesses (including vectors if available on the CPU).
size | Size in bytes for the memory block to be allocated. |
void* av_mallocz | ( | unsigned int | size | ) |
Allocates a block of size bytes with alignment suitable for all memory accesses (including vectors if available on the CPU) and zeroes all the bytes of the block.
size | Size in bytes for the memory block to be allocated. |
void* av_realloc | ( | void * | ptr, | |
unsigned int | size | |||
) |
Allocates or reallocates a block of memory.
If ptr is NULL and size > 0, allocates a new block. If size is zero, frees the memory block pointed to by ptr.
size | Size in bytes for the memory block to be allocated or reallocated. | |
ptr | Pointer to a memory block already allocated with av_malloc(z)() or av_realloc() or NULL. |
char* av_strdup | ( | const char * | s | ) |