ffmpeg.libavutil.mem

@file @ingroup lavu_mem Memory handling functions

Members

Functions

av_calloc
void* av_calloc(size_t nmemb, size_t size)

Non-inlined equivalent of av_mallocz_array().

av_dynarray2_add
void* av_dynarray2_add(void** tab_ptr, int* nb_ptr, size_t elem_size, const(ubyte)* elem_data)

Add an element of size elem_size to a dynamic array.

av_dynarray_add
void av_dynarray_add(void* tab_ptr, int* nb_ptr, void* elem)

Add the pointer to an element to a dynamic array.

av_dynarray_add_nofree
int av_dynarray_add_nofree(void* tab_ptr, int* nb_ptr, void* elem)

Add an element to a dynamic array.

av_fast_malloc
void av_fast_malloc(void* ptr, uint* size, size_t min_size)

Allocate a buffer, reusing the given one if large enough.

av_fast_mallocz
void av_fast_mallocz(void* ptr, uint* size, size_t min_size)

Allocate and clear a buffer, reusing the given one if large enough.

av_fast_realloc
void* av_fast_realloc(void* ptr, uint* size, size_t min_size)

Reallocate the given buffer if it is not large enough, otherwise do nothing.

av_free
void av_free(void* ptr)

Free a memory block which has been allocated with a function of av_malloc() or av_realloc() family.

av_freep
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.

av_malloc
void* av_malloc(size_t size)

Allocate a memory block with alignment suitable for all memory accesses (including vectors if available on the CPU).

av_malloc_array
void* av_malloc_array(size_t nmemb, size_t size)

Allocate a memory block for an array with av_malloc().

av_mallocz
void* av_mallocz(size_t size)

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.

av_mallocz_array
void* av_mallocz_array(size_t nmemb, size_t size)

Allocate a memory block for an array with av_mallocz().

av_max_alloc
void av_max_alloc(size_t max)

Set the maximum size that may be allocated in one block.

av_memcpy_backptr
void av_memcpy_backptr(ubyte* dst, int back, int cnt)

Overlapping memcpy() implementation.

av_memdup
void* av_memdup(const(void)* p, size_t size)

Duplicate a buffer with av_malloc().

av_realloc
void* av_realloc(void* ptr, size_t size)

Allocate, reallocate, or free a block of memory.

av_realloc_array
void* av_realloc_array(void* ptr, size_t nmemb, size_t size)

Allocate, reallocate, or free an array.

av_realloc_f
void* av_realloc_f(void* ptr, size_t nelem, size_t elsize)

Allocate, reallocate, or free a block of memory.

av_reallocp
int av_reallocp(void* ptr, size_t size)

Allocate, reallocate, or free a block of memory through a pointer to a pointer.

av_reallocp_array
int av_reallocp_array(void* ptr, size_t nmemb, size_t size)

Allocate, reallocate, or free an array through a pointer to a pointer.

av_size_mult
int av_size_mult(size_t a, size_t b, size_t* r)

Multiply two size_t values checking for overflow.

av_strdup
char* av_strdup(const(char)* s)

Duplicate a string.

av_strndup
char* av_strndup(const(char)* s, size_t len)

Duplicate a substring of a string.

Meta