From: Sergio Gonzalez Monroy Date: Tue, 5 Jul 2016 11:01:16 +0000 (+0100) Subject: mem: do not zero out memory on zmalloc X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=b78c9175118f7d61022ddc5c62ce54a1bd73cea5 mem: do not zero out memory on zmalloc Zeroing out memory on rte_zmalloc_socket is not required anymore since all allocated memory is already zeroed. Signed-off-by: Sergio Gonzalez Monroy --- diff --git a/lib/librte_eal/common/rte_malloc.c b/lib/librte_eal/common/rte_malloc.c index 47deb007d2..f4a8835292 100644 --- a/lib/librte_eal/common/rte_malloc.c +++ b/lib/librte_eal/common/rte_malloc.c @@ -123,11 +123,7 @@ rte_malloc(const char *type, size_t size, unsigned align) void * rte_zmalloc_socket(const char *type, size_t size, unsigned align, int socket) { - void *ptr = rte_malloc_socket(type, size, align, socket); - - if (ptr != NULL) - memset(ptr, 0, size); - return ptr; + return rte_malloc_socket(type, size, align, socket); } /*