GEL  0.99
gel_mem.h File Reference
#include <stdio.h>
#include <stdlib.h>

Go to the source code of this file.

Macros

#define new(t)   ((t *)malloc(sizeof(t)))
 
#define newc(t)   ((t *)calloc(sizeof(t), 1))
 
#define newv(t, n)   ((t *)malloc(sizeof(t) * n))
 
#define newvc(t, n)   ((t *)calloc(sizeof(t), n))
 
#define delete(p)   free(p)
 

Functions

void * gel_debug_new (const char *file, int line, const char *t, int size)
 
void * gel_debug_newc (const char *file, int line, const char *t, int size)
 
void * gel_debug_newv (const char *file, int line, const char *t, int size, int n)
 
void * gel_debug_newvc (const char *file, int line, const char *t, int size, int n)
 
void * gel_debug_delete (const char *file, int line, void *p)
 

Macro Definition Documentation

◆ delete

#define delete (   p)    free(p)

◆ new

#define new (   t)    ((t *)malloc(sizeof(t)))

◆ newc

#define newc (   t)    ((t *)calloc(sizeof(t), 1))

◆ newv

#define newv (   t,
 
)    ((t *)malloc(sizeof(t) * n))

◆ newvc

#define newvc (   t,
 
)    ((t *)calloc(sizeof(t), n))

Function Documentation

◆ gel_debug_delete()

void* gel_debug_delete ( const char *  file,
int  line,
void *  p 
)

◆ gel_debug_new()

void* gel_debug_new ( const char *  file,
int  line,
const char *  t,
int  size 
)

◆ gel_debug_newc()

void* gel_debug_newc ( const char *  file,
int  line,
const char *  t,
int  size 
)

◆ gel_debug_newv()

void* gel_debug_newv ( const char *  file,
int  line,
const char *  t,
int  size,
int  n 
)

◆ gel_debug_newvc()

void* gel_debug_newvc ( const char *  file,
int  line,
const char *  t,
int  size,
int  n 
)