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.
*************************************************************************/
#include <assert.h>
+#include <cgraph/alloc.h>
#include <dotgen/dot.h>
#include <stdbool.h>
edge_t *e;
prev = NULL;
- GD_rankleader(subg) = N_NEW(GD_maxrank(subg) + 2, node_t *);
+ GD_rankleader(subg) = gv_calloc(GD_maxrank(subg) + 2, sizeof(node_t*));
for (r = GD_minrank(subg); r <= GD_maxrank(subg); r++) {
v = GD_rankleader(subg)[r] = virtual_node(g);
ND_rank(v) = r;