TwiceAsNice  2019-02-18
Classes | Macros | Functions | Variables
libfli-mem.c File Reference
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdarg.h>
#include "libfli-libfli.h"
#include "libfli-mem.h"
Include dependency graph for libfli-mem.c:

Classes

struct  _mem_ptrs
 

Macros

#define DEFAULT_NUM_POINTERS   (1024)
 

Functions

static void * saveptr (void *ptr)
 
static void ** findptr (void *ptr)
 
static int deleteptr (void *ptr)
 
void * xmalloc (size_t size)
 
void * xcalloc (size_t nmemb, size_t size)
 
void xfree (void *ptr)
 
void * xrealloc (void *ptr, size_t size)
 
int xfree_all (void)
 
char * xstrdup (const char *s)
 
char * xstrndup (const char *s, size_t siz)
 
int xasprintf (char **strp, const char *fmt,...)
 

Variables

static struct _mem_ptrs allocated = {NULL, 0, 0}
 

Macro Definition Documentation

◆ DEFAULT_NUM_POINTERS

#define DEFAULT_NUM_POINTERS   (1024)

Function Documentation

◆ deleteptr()

static int deleteptr ( void *  ptr)
static

◆ findptr()

static void** findptr ( void *  ptr)
static

◆ saveptr()

static void* saveptr ( void *  ptr)
static

◆ xasprintf()

int xasprintf ( char **  strp,
const char *  fmt,
  ... 
)

◆ xcalloc()

void* xcalloc ( size_t  nmemb,
size_t  size 
)

◆ xfree()

void xfree ( void *  ptr)

◆ xfree_all()

int xfree_all ( void  )

◆ xmalloc()

void* xmalloc ( size_t  size)

◆ xrealloc()

void* xrealloc ( void *  ptr,
size_t  size 
)

◆ xstrdup()

char* xstrdup ( const char *  s)

◆ xstrndup()

char* xstrndup ( const char *  s,
size_t  siz 
)

Variable Documentation

◆ allocated

struct _mem_ptrs allocated = {NULL, 0, 0}
static