mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-26 00:10:38 +01:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ba128ad33 |
@@ -194,7 +194,7 @@ void init_topology_struct(struct topology* topo, struct cache* cach) {
|
|||||||
topo->sockets = 0;
|
topo->sockets = 0;
|
||||||
#ifdef ARCH_X86
|
#ifdef ARCH_X86
|
||||||
topo->smt_available = 0;
|
topo->smt_available = 0;
|
||||||
topo->apic = emalloc(sizeof(struct apic));
|
topo->apic = ecalloc(1, sizeof(struct apic));
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1170,7 +1170,9 @@ void print_raw(struct cpuInfo* cpu) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void free_topo_struct(struct topology* topo) {
|
void free_topo_struct(struct topology* topo) {
|
||||||
|
if(topo->apic->cache_select_mask != NULL)
|
||||||
free(topo->apic->cache_select_mask);
|
free(topo->apic->cache_select_mask);
|
||||||
|
if(topo->apic->cache_id_apic != NULL)
|
||||||
free(topo->apic->cache_id_apic);
|
free(topo->apic->cache_id_apic);
|
||||||
free(topo->apic);
|
free(topo->apic);
|
||||||
free(topo);
|
free(topo);
|
||||||
|
|||||||
Reference in New Issue
Block a user