libgpac
Documentation of the core library of GPAC
alloc.c File Reference
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <gpac/configuration.h>
#include <gpac/setup.h>
#include <gpac/tools.h>
+ Include dependency graph for alloc.c:

Macros

#define STD_MALLOC   0
 
#define GOOGLE_MALLOC   1
 
#define INTEL_MALLOC   2
 
#define DL_MALLOC   3
 
#define USE_MALLOC   STD_MALLOC
 
#define CDECL
 
#define MALLOC   malloc
 
#define CALLOC   calloc
 
#define REALLOC   realloc
 
#define FREE   free
 
#define STRDUP(a)   return strdup(a);
 

Functions

GF_EXPORT void * gf_malloc (size_t size)
 
GF_EXPORT void * gf_calloc (size_t num, size_t size_of)
 
GF_EXPORT void * gf_realloc (void *ptr, size_t size)
 
GF_EXPORT void gf_free (void *ptr)
 
GF_EXPORT char * gf_strdup (const char *str)
 
GF_EXPORT size_t gf_strlcpy (char *dst, const char *src, size_t dsize)
 

Macro Definition Documentation

◆ STD_MALLOC

#define STD_MALLOC   0

◆ GOOGLE_MALLOC

#define GOOGLE_MALLOC   1

◆ INTEL_MALLOC

#define INTEL_MALLOC   2

◆ DL_MALLOC

#define DL_MALLOC   3

◆ USE_MALLOC

#define USE_MALLOC   STD_MALLOC

◆ CDECL

#define CDECL

◆ MALLOC

#define MALLOC   malloc

◆ CALLOC

#define CALLOC   calloc

◆ REALLOC

#define REALLOC   realloc

◆ FREE

#define FREE   free

◆ STRDUP

#define STRDUP (   a)    return strdup(a);

Function Documentation

◆ gf_strlcpy()

GF_EXPORT size_t gf_strlcpy ( char *  dst,
const char *  src,
size_t  dsize 
)

copy source string to destination, ensuring 0-terminated string result

Parameters
dstdestination buffer
srcsource buffer
dsizesize of destination buffer
Returns
same as strlcpy
+ Here is the caller graph for this function: