Get Number of Logical Processors
-
Is there a way to get the number of logical processors in a Windows XP system? If I see that the application is running on Windows XP and that hyperthreading is enabled (how do I do that?) I guess I could just divide by two? Are there any api calls for this? I found something about
GetLogicalProcessorInformation
, but that didn't seem to be what I need. Thanks, Nathan --------------------------- Hmmm... what's a signature? -
Is there a way to get the number of logical processors in a Windows XP system? If I see that the application is running on Windows XP and that hyperthreading is enabled (how do I do that?) I guess I could just divide by two? Are there any api calls for this? I found something about
GetLogicalProcessorInformation
, but that didn't seem to be what I need. Thanks, Nathan --------------------------- Hmmm... what's a signature? -
Is there a way to get the number of logical processors in a Windows XP system? If I see that the application is running on Windows XP and that hyperthreading is enabled (how do I do that?) I guess I could just divide by two? Are there any api calls for this? I found something about
GetLogicalProcessorInformation
, but that didn't seem to be what I need. Thanks, Nathan --------------------------- Hmmm... what's a signature?Try GetSystemInfo. I believe that the SYSTEM_INFO.dwNumberOfProcessors returns the number of logical processors (although I could be wrong). onwards and upwards...
-
Try GetSystemInfo. I believe that the SYSTEM_INFO.dwNumberOfProcessors returns the number of logical processors (although I could be wrong). onwards and upwards...
see answer to kuphryn... --------------------------- Hmmm... what's a signature?
-
What is the difference between normal CPU and logical CPU? One solution is GetSystemInfo(). Kuphryn
With Hyperthreading you have physical processors and logical processors. Example, let's say: I have to physical processors each one is also a logical processor. I then enable hyperthreading on both CPUs. Windows now thinks that I have 4 logical processors, that being each physical processor now represents two logical. I wish to be able to get the number of physical processors and then also the number of logical processors. The reason for this is that if I were to have 4 real physical processors I might then spin out 8 threads. On the other hand, if I have only two physical processors that each are hyperthreaded I would only spin out 6 threads (logical processors aren't as capable as a physical processor). Hope this offers some explanation. -Nathan --------------------------- Hmmm... what's a signature?
-
Is there a way to get the number of logical processors in a Windows XP system? If I see that the application is running on Windows XP and that hyperthreading is enabled (how do I do that?) I guess I could just divide by two? Are there any api calls for this? I found something about
GetLogicalProcessorInformation
, but that didn't seem to be what I need. Thanks, Nathan --------------------------- Hmmm... what's a signature?I found the answer on Intel's site: CPU Counting Utility[^] --------------------------- Hmmm... what's a signature?