mirror of
https://github.com/ggerganov/ggwave.git
synced 2026-04-04 20:56:50 +08:00
ggwave : zero-out the heap memory upon allocation
This commit is contained in:
@@ -506,9 +506,7 @@ bool GGWave::prepare(const Parameters & parameters) {
|
|||||||
|
|
||||||
const auto heapSize0 = m_heapSize;
|
const auto heapSize0 = m_heapSize;
|
||||||
|
|
||||||
m_heap = malloc(m_heapSize);
|
m_heap = calloc(m_heapSize, 1);
|
||||||
// not sure if allocating alligned memory makes any difference
|
|
||||||
//m_heap = aligned_alloc(kAlignment, m_heapSize);
|
|
||||||
|
|
||||||
m_heapSize = 0;
|
m_heapSize = 0;
|
||||||
if (this->alloc(m_heap, m_heapSize) == false) {
|
if (this->alloc(m_heap, m_heapSize) == false) {
|
||||||
|
|||||||
Reference in New Issue
Block a user