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)
#define MAX_MALLOC_SIZE   INT_MAX

Functions

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.
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_dynarray_add (void *tab_ptr, int *nb_ptr, void *elem)
 Add an element to a dynamic array.


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.

#define MAX_MALLOC_SIZE   INT_MAX

Definition at line 68 of file mem.c.

Referenced by av_malloc(), and av_realloc().


Generated on Fri Oct 26 02:43:53 2012 for FFmpeg by  doxygen 1.5.8