multi-core fix

master
ColumbusUtigas 2019-12-10 21:48:05 +03:00
parent 8138a2b721
commit 5d182db6d8
1 changed files with 1 additions and 1 deletions

View File

@ -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;