Is there a way to determine how many cores a machine has from C/C++ in a platform-independent way? If no such thing exists, what about determining it per-platform (Windows/*
Windows Server 2003 and later lets you leverage the GetLogicalProcessorInformation function
http://msdn.microsoft.com/en-us/library/ms683194.aspx