![]() |
libgpac
Documentation of the core library of GPAC
|
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <config.h>
#include <base/commandlineflags.h>
#include <google/malloc_extension.h>
#include <stdlib.h>
#include <assert.h>
#include <gpac/configuration.h>
#include <gpac/setup.h>
#include <gpac/tools.h>
Macros | |
#define | STD_MALLOC 0 |
#define | GOOGLE_MALLOC 1 |
#define | INTEL_MALLOC 2 |
#define | DL_MALLOC 3 |
#define | USE_MALLOC STD_MALLOC |
#define | MALLOC malloc |
#define | CALLOC calloc |
#define | REALLOC realloc |
#define | FREE free |
#define | STRDUP(a) return strdup(a); |
#define | CDECL extern "C" |
#define | CDECL |
#define | MALLOC scalable_malloc |
#define | CALLOC scalable_calloc |
#define | REALLOC scalable_realloc |
#define | FREE scalable_free |
#define | STRDUP(_a) if (_a) { unsigned int len = strlen(_a)+1; char *ptr = (char *) scalable_malloc(len); strcpy(ptr, _a); return ptr; } else { return NULL; } |
#define | MALLOC dlmalloc |
#define | CALLOC dlcalloc |
#define | REALLOC dlrealloc |
#define | FREE dlfree |
#define | STRDUP(_a) if (_a) { unsigned int len = strlen(_a)+1; char *ptr = (char *) dlmalloc(len); strcpy(ptr, _a); return ptr; } else { return NULL; } |
#define | MALLOC malloc |
#define | CALLOC calloc |
#define | REALLOC realloc |
#define | FREE free |
#define | STRDUP(a) return strdup(a); |
Functions | |
CDECL void * | scalable_malloc (size_t size) |
CDECL void * | scalable_realloc (void *ptr, size_t size) |
CDECL void * | scalable_calloc (size_t num, size_t size) |
CDECL void | scalable_free (void *ptr) |
CDECL void * | dlmalloc (size_t size) |
CDECL void * | dlrealloc (void *ptr, size_t size) |
CDECL void * | dlcalloc (size_t num, size_t size) |
CDECL void | dlfree (void *ptr) |
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) |
#define STD_MALLOC 0 |
#define GOOGLE_MALLOC 1 |
#define INTEL_MALLOC 2 |
#define DL_MALLOC 3 |
#define USE_MALLOC STD_MALLOC |
#define MALLOC malloc |
#define CALLOC calloc |
#define REALLOC realloc |
#define FREE free |
#define STRDUP | ( | a | ) | return strdup(a); |
#define CDECL extern "C" |
#define CDECL |
#define MALLOC scalable_malloc |
#define CALLOC scalable_calloc |
#define REALLOC scalable_realloc |
#define FREE scalable_free |
#define STRDUP | ( | _a | ) | if (_a) { unsigned int len = strlen(_a)+1; char *ptr = (char *) scalable_malloc(len); strcpy(ptr, _a); return ptr; } else { return NULL; } |
#define MALLOC dlmalloc |
#define CALLOC dlcalloc |
#define REALLOC dlrealloc |
#define FREE dlfree |
#define STRDUP | ( | _a | ) | if (_a) { unsigned int len = strlen(_a)+1; char *ptr = (char *) dlmalloc(len); strcpy(ptr, _a); return ptr; } else { return NULL; } |
#define MALLOC malloc |
#define CALLOC calloc |
#define REALLOC realloc |
#define FREE free |
#define STRDUP | ( | a | ) | return strdup(a); |
CDECL void * scalable_malloc | ( | size_t | size | ) |
CDECL void * scalable_realloc | ( | void * | ptr, |
size_t | size | ||
) |
CDECL void * scalable_calloc | ( | size_t | num, |
size_t | size | ||
) |
CDECL void scalable_free | ( | void * | ptr | ) |
void * dlmalloc | ( | size_t | size | ) |
void * dlrealloc | ( | void * | ptr, |
size_t | size | ||
) |
void * dlcalloc | ( | size_t | num, |
size_t | size | ||
) |
void dlfree | ( | void * | ptr | ) |
GF_EXPORT size_t gf_strlcpy | ( | char * | dst, |
const char * | src, | ||
size_t | dsize | ||
) |
copy source string to destination, ensuring 0-terminated string result
dst | destination buffer |
src | source buffer |
dsize | size of destination buffer |