[dpdk-dev] How *rte_zmalloc_socket* ensure that the memory is zero'd ?
He Peng
xnhp0320 at icloud.com
Wed Jul 17 04:26:57 CEST 2019
Hi,
In file dpdk/lib/librte_eal/common/rte_malloc.c:
/*
* Allocate memory on default heap.
*/
void *
rte_malloc(const char *type, size_t size, unsigned align)
{
return rte_malloc_socket(type, size, align, SOCKET_ID_ANY);
}
/*
* Allocate zero'd memory on specified heap.
*/
void *
rte_zmalloc_socket(const char *type, size_t size, unsigned align, int socket)
{
return rte_malloc_socket(type, size, align, socket);
}
Looks like the *rte_malloc* and *rte_zmalloc_socket* is the same, then, how the latter function ensure the memory allocated by is zeroed?
More information about the dev
mailing list