기본카테고리

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

DevAdd 2010. 10. 8. 11:08




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;