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.
The commit series ending in
78a0004fd0d1350f2c34e3a770d93032882706f7 previously
removed all uses of the lib/common/memory.h wrappers. But reverting
656a15f855a31acc6eeb162284b89ad3367253b9 brought another usage back in.
#include <cgraph/alloc.h>
#include <cgraph/strcasecmp.h>
#include <cgraph/strview.h>
-#include <common/memory.h>
#include <string.h>
static int sel_node;
argc = 1;
if (*bf2 != '\0')
argc++;
- argv = N_NEW(argc + 1, char *);
+ argv = gv_calloc(argc + 1, sizeof(char*));
size_t j = 0;
argv[j++] = "smyrna";
argv[j++] = bf2;