FFmpeg
Macros
Function Attributes

Function attributes applicable to memory handling functions. More...

Macros

#define av_malloc_attrib
 
#define av_alloc_size(...)
 

Detailed Description

Function attributes applicable to memory handling functions.

These function attributes can help compilers emit more useful warnings, or generate better code.

Macro Definition Documentation

◆ av_malloc_attrib

#define av_malloc_attrib

Function attribute denoting a malloc-like function.

See also
Function attribute malloc in GCC's documentation

Definition at line 148 of file mem.h.

◆ av_alloc_size

#define av_alloc_size (   ...)

Function attribute used on a function that allocates memory, whose size is given by the specified parameter(s).

void *av_malloc(size_t size) av_alloc_size(1);
void *av_calloc(size_t nmemb, size_t size) av_alloc_size(1, 2);
Parameters
...One or two parameter indexes, separated by a comma
See also
Function attribute alloc_size in GCC's documentation

Definition at line 169 of file mem.h.

av_malloc
#define av_malloc(s)
Definition: tableprint_vlc.h:31
av_alloc_size
#define av_alloc_size(...)
Definition: mem.h:169
size
int size
Definition: twinvq_data.h:11134
av_calloc
void * av_calloc(size_t nmemb, size_t size)
Non-inlined equivalent of av_mallocz_array().
Definition: mem.c:244