From 8bd8f9238805a147f47e63f6cd2b2f2fcd1acbcc Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Sat, 11 Jun 2022 18:49:28 +0300 Subject: [PATCH] ggwave : zero-out the heap memory upon allocation --- src/ggwave.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ggwave.cpp b/src/ggwave.cpp index a2f1c14..c1b0714 100644 --- a/src/ggwave.cpp +++ b/src/ggwave.cpp @@ -506,9 +506,7 @@ bool GGWave::prepare(const Parameters & parameters) { const auto heapSize0 = m_heapSize; - m_heap = malloc(m_heapSize); - // not sure if allocating alligned memory makes any difference - //m_heap = aligned_alloc(kAlignment, m_heapSize); + m_heap = calloc(m_heapSize, 1); m_heapSize = 0; if (this->alloc(m_heap, m_heapSize) == false) {