diff --git a/src/common/cpu.c b/src/common/cpu.c index 1987420..a7d53ca 100644 --- a/src/common/cpu.c +++ b/src/common/cpu.c @@ -194,7 +194,7 @@ void init_topology_struct(struct topology* topo, struct cache* cach) { topo->sockets = 0; #ifdef ARCH_X86 topo->smt_available = 0; - topo->apic = emalloc(sizeof(struct apic)); + topo->apic = ecalloc(1, sizeof(struct apic)); #endif #endif }