82f9318055
On Linux, all huge pages are zeroed by the kernel before first access by the DPDK application. But on FreeBSD, the contigmem driver would only zero the contiguous memory regions during initial driver load. DPDK commit b78c91751 eliminated the explicit memset() operation for rte_zmalloc(), which was OK on Linux because the kernel zeroes the pages during app start, but this broke FreeBSD when restarting app. So this patch explicitly zeroes the pages before they are mmap'd, to ensure equivalent behavior to Linux. Fixes: b78c9175118f ("mem: do not zero out memory on zmalloc") Reported-by: Daniel Verkamp <daniel.verkamp@intel.com> Signed-off-by: Jim Harris <james.r.harris@intel.com> Tested-by: Daniel Verkamp <daniel.verkamp@intel.com> Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>