#include "allocator.h" #include #include #include const struct allocator *ga = &stdlib_heap_allocator; int main(int argc, const char **argv) { struct test *test; int rc; if (argc <= 1) exit(1); test = ga->alloc(ga, strtoull(argv[1], NULL, 10), &rc); if (!test) errx(1, "alloc: %s", strerror(rc)); rc = ga->free(ga, test); if (rc) errx(1, "free: %s", strerror(rc)); }