|
FFmpeg
|
default memory allocator for libavutil More...
#include "config.h"#include <limits.h>#include <stdint.h>#include <stdlib.h>#include <string.h>#include "avassert.h"#include "avutil.h"#include "intreadwrite.h"#include "mem.h"Go to the source code of this file.
Macros | |
| #define | _XOPEN_SOURCE 600 |
| #define | ALIGN (HAVE_AVX ? 32 : 16) |
Functions | |
| void | av_max_alloc (size_t max) |
| Set the maximum size that may me allocated in one block. | |
| void * | av_malloc (size_t size) |
| Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if available on the CPU). | |
| void * | av_realloc (void *ptr, size_t size) |
| Allocate or reallocate a block of memory. | |
| void * | av_realloc_f (void *ptr, size_t nelem, size_t elsize) |
| Allocate or reallocate a block of memory. | |
| int | av_reallocp (void *ptr, size_t size) |
| Allocate or reallocate a block of memory. | |
| void * | av_realloc_array (void *ptr, size_t nmemb, size_t size) |
| int | av_reallocp_array (void *ptr, size_t nmemb, size_t size) |
| void | av_free (void *ptr) |
| Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). | |
| void | av_freep (void *arg) |
| Free 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_mallocz (size_t size) |
| Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if available on the CPU) and zero all the bytes of the block. | |
| void * | av_calloc (size_t nmemb, size_t size) |
| Allocate a block of nmemb * size bytes with alignment suitable for all memory accesses (including vectors if available on the CPU) and zero all the bytes of the block. | |
| char * | av_strdup (const char *s) |
| Duplicate the string s. | |
| void * | av_memdup (const void *p, size_t size) |
| Duplicate the buffer p. | |
| void | av_dynarray_add (void *tab_ptr, int *nb_ptr, void *elem) |
| Add an element to a dynamic array. | |
| 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. | |
| static void | fill16 (uint8_t *dst, int len) |
| static void | fill24 (uint8_t *dst, int len) |
| static void | fill32 (uint8_t *dst, int len) |
| void | av_memcpy_backptr (uint8_t *dst, int back, int cnt) |
| deliberately overlapping memcpy implementation | |
Variables | |
| static size_t | max_alloc_size = INT_MAX |
default memory allocator for libavutil
Definition in file mem.c.
| #define ALIGN (HAVE_AVX ? 32 : 16) |
Definition at line 60 of file mem.c.
Referenced by av_free(), av_malloc(), and av_realloc().
Definition at line 203 of file mem.c.
Referenced by avformat_new_stream(), decode_nal_units(), ebml_parse_elem(), ff_insert_pad(), ff_program_add_stream_index(), ff_rtmp_check_alloc_array(), mkv_add_cuepoint(), mkv_add_seekhead_entry(), mxf_add_metadata_set(), mxf_read_partition_pack(), parse_nal_units(), and sample_queue_push().
| int av_reallocp_array | ( | void * | ptr, |
| size_t | nmemb, | ||
| size_t | size | ||
| ) |
Definition at line 210 of file mem.c.
Referenced by add_pat_entry(), decode_nal_units(), ff_hevc_extract_rbsp(), ff_mov_write_packet(), gxf_write_map_packet(), gxf_write_packet(), mov_build_index(), mov_flush_fragment(), mov_read_trex(), mov_read_trun(), mxf_write_packet(), mxf_write_partition(), nut_write_packet(), ogg_restore(), parse_strk(), tgv_decode_inter(), tm2_read_stream(), update_index(), and vp56_size_changed().
Definition at line 342 of file mem.c.
Referenced by av_memcpy_backptr().
Definition at line 360 of file mem.c.
Referenced by av_memcpy_backptr().
Definition at line 400 of file mem.c.
Referenced by av_memcpy_backptr().
|
static |
Definition at line 67 of file mem.c.
Referenced by av_malloc(), av_max_alloc(), and av_realloc().
1.8.2