[issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors

Giampaolo Rodola' report at bugs.python.org
Sat Jul 29 12:57:08 EDT 2017


Giampaolo Rodola' added the comment:

I agree that the MS Docs for this are a bit confusing. I ended up reaching out to the guy who authored the GetMaximumProcessorCount function. I had also written an implementation that iterated over GetProcessorInformationEx and he advised against it. 

One of the things that makes this interesting is that in 32 bit processes (wow64) your processor is simulated to fit in the confines of that old system. This method will only report 32 cores under 32 bit as that is all the program can access in 32 bit mode.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30581>
_______________________________________


More information about the Python-bugs-list mailing list