From 0a048717bfc83ee32a64e648c30831e7d343f215 Mon Sep 17 00:00:00 2001 From: Dr-Noob Date: Sun, 24 Dec 2023 23:03:20 +0000 Subject: [PATCH] [v1.04][X86] Fix bug in AMD CPUs (#212) --- src/common/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }