'The DPDK function rte_malloc returns NULL while no allocation is made yet

This is my code:

int main(int argc, char *argv[]) {
    rte_eal_init(argc, argv);
    size_t size = 1000;
    void *p = rte_malloc(NULL, size, 0);
    printf("p: %p\n", p);
    return 0;
}

It's wonderful that I get the following output:

p: (nil)

I didn't forget to reserve huge pages and dpdk-hugepages.py -s shows that.

What may be the problem?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source