Small, Fast S-Expression Library
sexp_memory.h File Reference

Wrappers around basic memory allocation/deallocation routines to allow memory usage limiting. Only enabled if SEXP_LIMIT_MEMORY is defined when building the library, otherwise the routines are defined to be the standard malloc/calloc/realloc/free functions. More...

Go to the source code of this file.

Macros

#define sexp_calloc(count, size)
 
#define sexp_malloc(size)
 
#define sexp_free(ptr, size)
 
#define sexp_realloc(ptr, size, oldsize)
 

Detailed Description

Wrappers around basic memory allocation/deallocation routines to allow memory usage limiting. Only enabled if SEXP_LIMIT_MEMORY is defined when building the library, otherwise the routines are defined to be the standard malloc/calloc/realloc/free functions.

Macro Definition Documentation

◆ sexp_calloc

#define sexp_calloc ( count,
size )
Value:
calloc(count,size)

SEXP_LIMIT_MEMORY not defined. This is a macro that maps to calloc().

◆ sexp_free

#define sexp_free ( ptr,
size )
Value:
free(ptr)

SEXP_LIMIT_MEMORY not defined. This is a macro that maps to free().

◆ sexp_malloc

#define sexp_malloc ( size)
Value:
malloc(size)

SEXP_LIMIT_MEMORY not defined. This is a macro that maps to malloc().

◆ sexp_realloc

#define sexp_realloc ( ptr,
size,
oldsize )
Value:
realloc((ptr),(size))

SEXP_LIMIT_MEMORY not defined. This is a macro that maps to realloc().