English 中文(简体)
恢复物理核心处理器的数量
原标题:Retrieving the number of physical core processors

我知道,我可以使用<代码>System.Environment.ProcessorCount,将机器中的“处理器”数目退回。 我试图做的是,如果能够确定加工商的核心数量,而不是将高读作为“核心”。 例如,关于双芯高读处理器,System.Environment.ProcessorCount将退回4个,因为有2个物理核心,既有超读。 我想做的是归还2,因为只有2个物理核心。

我正以这种方式使用C#。

最佳回答

你们可以利用海事委员会获得该系统的核心数量。 关于中继流的这个类似问题包括一个代码样本: -->。 如何通过NET/C#查找CPU核心数?

牢记的一个重要要点是,在某些制度中,这种价值可能无法得到;例如,在2003年窗户服务器上,你需要从微软下载一个热点,以获得“NumberOfCores”的工作。

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签