|
FFmpeg
|
Memory handling functions. More...
#include <limits.h>#include <stdint.h>#include "attributes.h"#include "error.h"#include "avutil.h"Go to the source code of this file.
Macros | |
| #define | DECLARE_ALIGNED(n, t, v) t v |
| Declare a variable that is aligned in memory. More... | |
| #define | DECLARE_ASM_ALIGNED(n, t, v) t v |
| Declare an aligned variable appropriate for use in inline assembly code. More... | |
| #define | DECLARE_ASM_CONST(n, t, v) static const t v |
| Declare a static constant aligned variable appropriate for use in inline assembly code. More... | |
| #define | av_malloc_attrib |
| Function attribute denoting a malloc-like function. More... | |
| #define | av_alloc_size(...) |
| Function attribute used on a function that allocates memory, whose size is given by the specified parameter(s). More... | |
Functions | |
| void * | av_malloc (size_t size) av_malloc_attrib av_alloc_size(1) |
| Allocate a memory block with alignment suitable for all memory accesses (including vectors if available on the CPU). More... | |
| void * | av_mallocz (size_t size) av_malloc_attrib av_alloc_size(1) |
| Allocate a memory block with alignment suitable for all memory accesses (including vectors if available on the CPU) and zero all the bytes of the block. More... | |
| av_alloc_size (1, 2) void *av_malloc_array(size_t nmemb | |
| Allocate a memory block for an array with av_malloc(). More... | |
| void * | av_calloc (size_t nmemb, size_t size) av_malloc_attrib |
| Non-inlined equivalent of av_mallocz_array(). More... | |
| void * | av_realloc (void *ptr, size_t size) av_alloc_size(2) |
| Allocate, reallocate, or free a block of memory. More... | |
| av_warn_unused_result int | av_reallocp (void *ptr, size_t size) |
| Allocate, reallocate, or free a block of memory through a pointer to a pointer. More... | |
| void * | av_realloc_f (void *ptr, size_t nelem, size_t elsize) |
| Allocate, reallocate, or free a block of memory. More... | |
| av_alloc_size (2, 3) void *av_realloc_array(void *ptr | |
| Allocate, reallocate, or free an array. More... | |
| void * | av_fast_realloc (void *ptr, unsigned int *size, size_t min_size) |
| Reallocate the given buffer if it is not large enough, otherwise do nothing. More... | |
| void | av_fast_malloc (void *ptr, unsigned int *size, size_t min_size) |
| Allocate a buffer, reusing the given one if large enough. More... | |
| void | av_fast_mallocz (void *ptr, unsigned int *size, size_t min_size) |
| Allocate and clear a buffer, reusing the given one if large enough. More... | |
| void | av_free (void *ptr) |
| Free a memory block which has been allocated with a function of av_malloc() or av_realloc() family. More... | |
| void | av_freep (void *ptr) |
Free a memory block which has been allocated with a function of av_malloc() or av_realloc() family, and set the pointer pointing to it to NULL. More... | |
| char * | av_strdup (const char *s) av_malloc_attrib |
| Duplicate a string. More... | |
| char * | av_strndup (const char *s, size_t len) av_malloc_attrib |
| Duplicate a substring of a string. More... | |
| void * | av_memdup (const void *p, size_t size) |
| Duplicate a buffer with av_malloc(). More... | |
| void | av_memcpy_backptr (uint8_t *dst, int back, int cnt) |
| Overlapping memcpy() implementation. More... | |
| void | av_dynarray_add (void *tab_ptr, int *nb_ptr, void *elem) |
| Add the pointer to an element to a dynamic array. More... | |
| av_warn_unused_result int | av_dynarray_add_nofree (void *tab_ptr, int *nb_ptr, void *elem) |
| Add an element to a dynamic array. More... | |
| void * | av_dynarray2_add (void **tab_ptr, int *nb_ptr, size_t elem_size, const uint8_t *elem_data) |
Add an element of size elem_size to a dynamic array. More... | |
| void | av_max_alloc (size_t max) |
| Set the maximum size that may be allocated in one block. More... | |
Variables | |
| size_t | size |
| size_t | nmemb |
Memory handling functions.
1.8.12