/misc/src/release/graphviz-2.18-1/src/graphviz-2.18/lib/common/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.

Defines

#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 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)


Define Documentation

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

Definition at line 42 of file memory.h.

Referenced by agNEWsym(), box_connection(), class2(), make_polyline(), move_node(), and new_spline().

#define GNEW (  )     (t*)gmalloc(sizeof(t))

Definition at line 40 of file memory.h.

Referenced by find_ints(), getfree(), gvplugin_install(), mkGrid(), newPM(), and newQueue().

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

Definition at line 41 of file memory.h.

Referenced by adjustGrid(), agxbinit(), agxbmore(), cAdjust(), ccomps(), compute_new_weights(), conjugate_gradient(), conjugate_gradient_f(), dijkstra_f(), ELinitialize(), embed_graph(), find_ints(), main(), makePoly(), makeSelfArcs(), makeSpline(), mkQueue(), PCA_alloc(), pccomps(), Plegal_arrangement(), polyOverlap(), power_iteration(), PQinitialize(), round_corners(), routesplinesinit(), scAdjust(), and solve().

#define N_NEW ( n,
 )     (t*)zmalloc((n)*sizeof(t))

Definition at line 39 of file memory.h.

Referenced by aglexinit(), agNEWedge(), agNEWnode(), allocate_ranks(), build_skeleton(), circuitModel(), compoundEdges(), compute_apsp_artifical_weights_packed(), compute_apsp_packed(), conjugate_gradient_mkernel(), dotneato_args_initialize(), emit_map_rect(), fdp_init_node_edge(), findCComp(), layout(), lu_decompose(), makeGraphs(), makeObstacle(), matinv(), neato_init_node(), neato_layout(), new_array(), new_queue(), new_spline(), pointsOf(), putGraphs(), round_corners(), scan_graph_mode(), shortest_path(), sizeArray(), sizeLinearArray(), and stress_majorization_kD_mkernel().

#define NEW (  )     (t*)zmalloc(sizeof(t))

Definition at line 38 of file memory.h.

Referenced by agNEWdict(), agNEWsym(), circomps(), compoundEdges(), epsf_init(), fdp_init_graph(), findCComp(), graph_init(), make_aux_edge(), make_label(), makeObstacle(), mkBlock(), mkNodelist(), mkStack(), new_queue(), new_spline(), new_virtual_edge(), and virtual_node().

#define RALLOC ( size,
ptr,
type   )     ((type*)grealloc(ptr,(size)*sizeof(type)))

Definition at line 43 of file memory.h.

Referenced by ccomps(), and pccomps().

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

Definition at line 44 of file memory.h.


Function Documentation

void* gmalloc ( size_t   ) 

Definition at line 47 of file memory.c.

References malloc(), and NULL.

Referenced by ccomps(), getfree(), gvconfig(), gvplugin_library_load(), pccomps(), strdup_and_subst_obj(), xml_string(), and zmalloc().

void* grealloc ( void *  ,
size_t   
)

Definition at line 60 of file memory.c.

References NULL, and realloc().

Referenced by canontoken(), colorxlate(), graph_init(), gv_argvlist_set_item(), gvplugin_library_load(), gvrender_beziercurve(), gvrender_polygon(), gvrender_polyline(), and xml_string().

void* zmalloc ( size_t   ) 

Definition at line 25 of file memory.c.

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

Definition at line 35 of file memory.c.

References NULL, and realloc().


Generated on Mon Mar 31 19:04:44 2008 for Graphviz by  doxygen 1.5.1