From 5d182db6d81782ed979ebe1fcfef4af6c24db4ec Mon Sep 17 00:00:00 2001 From: ColumbusUtigas Date: Tue, 10 Dec 2019 21:48:05 +0300 Subject: [PATCH] multi-core fix --- corinfo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/corinfo.h b/corinfo.h index 3c6dd33..bc65b49 100644 --- a/corinfo.h +++ b/corinfo.h @@ -254,7 +254,7 @@ int __corinfo_hdd_info(struct corinfo* info); ULONG CurrentIdleState; } PROCESSOR_POWER_INFORMATION, *PPI; - BYTE* buf = (BYTE*)malloc(sizeof(PROCESSOR_POWER_INFORMATION) * 4); + BYTE* buf = (BYTE*)malloc(sizeof(PROCESSOR_POWER_INFORMATION) * sys.dwNumberOfProcessors); if (buf == NULL) return -1; CallNtPowerInformation(ProcessorInformation, NULL, 0, buf, sizeof(PROCESSOR_POWER_INFORMATION) * sys.dwNumberOfProcessors); PPI = (PPIStruct*)buf;