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.
m = A->m;
n = A->n;
assert(n == m);
- *cluster = N_GNEW(m,int);
- *clusterp = N_GNEW((m+1),int);
- matched = N_GNEW(m,int);
- vlist = N_GNEW(2*m,double);
+ *cluster = gv_calloc(m, sizeof(int));
+ *clusterp = gv_calloc(m + 1, sizeof(int));
+ matched = gv_calloc(m, sizeof(int));
+ vlist = gv_calloc(2 * m, sizeof(double));
for (i = 0; i < m; i++) matched[i] = i;