printf("NULL pointer returned from rte_zmalloc\n");
return -1;
}
- rte_snprintf(ptr1, size1, "%s" ,hello_str);
+ snprintf(ptr1, size1, "%s" ,hello_str);
char *ptr2 = rte_realloc(ptr1, size2, CACHE_LINE_SIZE);
if (!ptr2){
rte_free(ptr1);
return 0;
}
-int
+static int
test_malloc(void)
{
unsigned lcore_id;
return 0;
}
+
+static struct test_command malloc_cmd = {
+ .command = "malloc_autotest",
+ .callback = test_malloc,
+};
+REGISTER_TEST_COMMAND(malloc_cmd);