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.
/* uses PRIVATE interface */
#define FDP_PRIVATE 1
+#include <cgraph/alloc.h>
#include <fdpgen/tlayout.h>
#include <neatogen/neatoprocs.h>
#include <cgraph/agxbuf.h>
static void init_node(node_t * n)
{
common_init_node(n);
- ND_pos(n) = N_NEW(GD_ndim(agraphof(n)), double);
+ ND_pos(n) = gv_calloc(GD_ndim(agraphof(n)), sizeof(double));
gv_nodesize(n, GD_flip(agraphof(n)));
}