Graphviz  2.41.20171026.1811
Macros | Functions
memory.h File Reference
#include <stdlib.h>
Include dependency graph for memory.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define NEW(t)   (t*)zmalloc(sizeof(t))
 
#define N_NEW(n, t)   (t*)zmalloc((n)*sizeof(t))
 
#define GNEW(t)   (t*)gmalloc(sizeof(t))
 
#define N_GNEW(n, t)   (t*)gmalloc((n)*sizeof(t))
 
#define N_GGNEW(n, t)   (t*)malloc((n)*sizeof(t))
 
#define ALLOC(size, ptr, type)   (ptr? (type*)grealloc(ptr,(size)*sizeof(type)):(type*)gmalloc((size)*sizeof(type)))
 
#define RALLOC(size, ptr, type)   ((type*)grealloc(ptr,(size)*sizeof(type)))
 
#define ZALLOC(size, ptr, type, osize)   (ptr? (type*)zrealloc(ptr,size,sizeof(type),osize):(type*)zmalloc((size)*sizeof(type)))
 

Functions

void * zmalloc (size_t)
 
void * zrealloc (void *, size_t, size_t, size_t)
 
void * gmalloc (size_t)
 
void * grealloc (void *, size_t)
 

Macro Definition Documentation

#define ALLOC (   size,
  ptr,
  type 
)    (ptr? (type*)grealloc(ptr,(size)*sizeof(type)):(type*)gmalloc((size)*sizeof(type)))

Definition at line 41 of file memory.h.

Referenced by box_connection(), class2(), move_node(), new_spline(), and simpleSplineRoute().

#define GNEW (   t)    (t*)gmalloc(sizeof(t))
#define N_GGNEW (   n,
 
)    (t*)malloc((n)*sizeof(t))

Definition at line 40 of file memory.h.

#define N_GNEW (   n,
 
)    (t*)gmalloc((n)*sizeof(t))

Definition at line 39 of file memory.h.

#define N_NEW (   n,
 
)    (t*)zmalloc((n)*sizeof(t))
#define NEW (   t)    (t*)zmalloc(sizeof(t))
#define RALLOC (   size,
  ptr,
  type 
)    ((type*)grealloc(ptr,(size)*sizeof(type)))

Definition at line 42 of file memory.h.

Referenced by cccomps(), ccomps(), gvPluginList(), and pccomps().

#define ZALLOC (   size,
  ptr,
  type,
  osize 
)    (ptr? (type*)zrealloc(ptr,size,sizeof(type),osize):(type*)zmalloc((size)*sizeof(type)))

Definition at line 43 of file memory.h.

Function Documentation

void* gmalloc ( size_t  )
void* grealloc ( void *  ,
size_t   
)
void* zmalloc ( size_t  )

Definition at line 20 of file memory.c.

void* zrealloc ( void *  ,
size_t  ,
size_t  ,
size_t   
)

Definition at line 30 of file memory.c.

References NULL.