The lib/cgraph/alloc.h wrappers are similar to the older lib/common/memory.h
wrappers except (1) they are header-only and (2) they live in a directory
(cgraph) that is at the root of the dependency tree. The long term plan is to
replace all use of lib/common/memory.h with lib/cgraph/alloc.h.
{
node_t *n = agnode(dg, name,1);
agbindrec(n, "Agnodeinfo_t", sizeof(Agnodeinfo_t), true); //node custom data
- ND_alg(n) = NEW(cdata);
+ ND_alg(n) = gv_alloc(sizeof(cdata));
if (isNode) {
- ND_pos(n) = N_NEW(Ndim, double);
+ ND_pos(n) = gv_calloc(Ndim, sizeof(double));
ND_lw(n) = ND_lw(orig);
ND_rw(n) = ND_rw(orig);
ND_ht(n) = ND_ht(orig);