【问题标题】:Does GetSystemInfo give you the total number of virtual CPUs (i.e. hyper-threaded)?GetSystemInfo 是否为您提供虚拟 CPU 的总数(即超线程)?
【发布时间】:2010-10-13 03:26:23
【问题描述】:

GetSystemInfo 将为您提供物理 CPU/内核的数量,但我想知道虚拟 CPU 的总数。 IE。在新的 Nahelam 芯片上,它们有 4 个内核,但显示为 8 个 CPU。

如果 GetSystemInfo 没有提供此信息,我需要什么 API(我见过一个获取逻辑处理器数量的函数,但它仅限于 Vista。我需要支持 XP)?

【问题讨论】:

    标签: c++ windows multithreading winapi


    【解决方案1】:

    使用 NAPI(Win32 常见问题解答)

    【讨论】:

      【解决方案2】:

      GetLogicalProcessorInformation函数 (Windows Vista、Windows XP Professional x64 Edition、Windows XP SP3)

      【讨论】:

      • 您好,我们必须支持 WindowsXP 的基本安装。我想在这种情况下我只需要使用 GetSystemInfo 作为备份。
      猜你喜欢
      • 2013-10-05
      • 2016-02-08
      • 2016-06-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-08-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多