유용한 정보

[C++]CPU Processor 갯수를 구함

DevReff 2024. 12. 26. 19:58
728x90
SMALL
반응형

SYSTEM_INFO SysInfo;
int nProcessors = 0;

// Get the number of processors in the system.
ZeroMemory (&SysInfo, sizeof (SYSTEM_INFO));
GetSystemInfo (&SysInfo);

// Number of physical processors in a non-Intel system
// or in a 32-bit Intel system with Hyper-Threading technology disabled
nProcessors = SysInfo.dwNumberOfProcessors;

출처: https://use1348.tistory.com/28 [유용한 정보:티스토리]