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 <string.h>
#define XLABEL_INT
#include <label/xlabels.h>
-#include <common/memory.h>
extern int Verbose;
static XLabels_t *xlnew(object_t * objs, int n_objs, xlabel_t * lbls,
int n_lbls, label_params_t * params)
{
- XLabels_t *xlp = NEW(XLabels_t);
+ XLabels_t *xlp = gv_alloc(sizeof(XLabels_t));
/* used to load the rtree in hilbert space filling curve order */
if (!(xlp->hdx = dtopen(&Hdisc, Dtobag))) {