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 "config.h"
-
+#include <cgraph/alloc.h>
#include <string.h>
#include <assert.h>
#include <stdbool.h>
#include <stdio.h>
#include <math.h>
#include <common/geom.h>
-#include <common/memory.h>
#include <common/types.h>
#include <ortho/trap.h>
QSIZE = 2*ntraps;
TRSIZE = ntraps;
- qs = N_NEW (2*ntraps, qnode_t);
+ qs = gv_calloc(2 * ntraps, sizeof(qnode_t));
q_idx = tr_idx = 1;
memset(tr, 0, ntraps*sizeof(trap_t));