Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does GetSystemInfo give you the total number of virtual CPUs (i.e. hyper-threaded)?

GetSystemInfo will give you the number of physical CPUs / cores, but I would like to know the total number of virtual CPUs. I.e. on the new Nahelam chips, they have 4 cores, but appear as 8 cpus.

If GetSystemInfo doesn't give this information, what API do I need (I've seen a function for getting number of logical processors, but it is Vista only. I need to support XP)?

like image 282
Mark Ingram Avatar asked Oct 28 '25 07:10

Mark Ingram


1 Answers

GetLogicalProcessorInformation Function ( Windows Vista, Windows XP Professional x64 Edition, Windows XP with SP3)

like image 140
aJ. Avatar answered Oct 31 '25 02:10

aJ.