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.
}
static relative_position_constraints relative_position_constraints_new(SparseMatrix A_constr, int edge_labeling_scheme, int n_constr_nodes, int *constr_nodes){
- relative_position_constraints data;
assert(A_constr);
- data = MALLOC(sizeof(struct relative_position_constraints_struct));
+ relative_position_constraints data = gv_alloc(sizeof(struct relative_position_constraints_struct));
data->constr_penalty = 1;
data->edge_labeling_scheme = edge_labeling_scheme;
data->n_constr_nodes = n_constr_nodes;