libavutil/mem.c File Reference

default memory allocator for libavutil More...

#include "config.h"
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include "avutil.h"
#include "mem.h"

Go to the source code of this file.

Defines

#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)
void * av_realloc_f (void *ptr, size_t nelem, size_t elsize)
 Allocate or reallocate a block of memory.
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)
void av_dynarray_add (void *tab_ptr, int *nb_ptr, void *elem)
 Add an element to a dynamic array.

Variables

static size_t max_alloc_size = INT_MAX


Detailed Description

default memory allocator for libavutil

Definition in file mem.c.


Define Documentation

#define _XOPEN_SOURCE   600

Definition at line 27 of file mem.c.

#define ALIGN   (HAVE_AVX ? 32 : 16)

Definition at line 62 of file mem.c.


Function Documentation

void* av_realloc ( void *  ptr,
size_t  size 
)

Definition at line 139 of file mem.c.

Referenced by add_fragment(), add_pat_entry(), add_tracked_method(), alloc_and_copy(), allocate_buffers(), asfrtp_parse_packet(), ass_split_section(), audio_resample(), av_bprint_alloc(), av_bprint_finalize(), av_dict_set(), av_dynarray_add(), av_fast_realloc(), av_grow_packet(), av_packet_new_side_data(), av_probe_input_buffer(), av_realloc_f(), avcodec_encode_audio2(), avcodec_encode_video2(), avfilter_graph_add_filter(), avformat_new_stream(), bmv_read_packet(), concat_open(), concatenate_packet(), decode_frame(), draw_text(), ebml_parse_elem(), ff_alsa_extend_reorder_buf(), ff_ass_add_rect(), ff_insert_pad(), ff_print_debug_info(), ff_program_add_stream_index(), fixup_vorbis_headers(), flashsv_decode_frame(), get_packet(), get_tcp_server_response(), grow_array(), h264_mp4toannexb_filter(), handle_file(), handle_notify(), libschroedinger_encode_frame(), main(), matroska_decode_buffer(), matroska_deliver_packet(), mkv_add_cuepoint(), mkv_add_seekhead_entry(), mov_build_index(), mov_flush_fragment(), mov_read_extradata(), mov_read_trex(), mov_read_trun(), mxf_add_metadata_set(), mxf_read_partition_pack(), mxf_write_packet(), mxf_write_partition(), new_video_stream(), nut_read_header(), nut_write_packet(), ogg_new_stream(), ogg_restore(), probe_codec(), qt_rtp_parse_packet(), rdt_parse_sdp_line(), realloc_section_array(), reconfigure_at_keyframe(), rtmp_http_write(), rtmp_open(), sample_queue_push(), smacker_read_packet(), tgv_decode_inter(), theora_header(), tm2_read_stream(), update_context_from_user(), update_index(), vc1_decode_frame(), vp56_size_changed(), and xan_decode_frame().

char* av_strdup ( const char *  s  ) 


Variable Documentation

size_t max_alloc_size = INT_MAX [static]

Definition at line 69 of file mem.c.

Referenced by av_malloc(), av_max_alloc(), and av_realloc().


Generated on Fri Oct 26 02:50:12 2012 for FFmpeg by  doxygen 1.5.8