Possible Duplicate:
Programatically detect number of physical processors/cores or if hyper-threading is active on Windows, Mac and Linux
I wonder if there is any crossplatform (std or boost based or even c) way to get totall number of cores in a crossplatform manner? (for linux Mac Os X and Windows)
Oooh, you’ll probably have to get down to assembly…
http://code.google.com/p/geekinfo/source/browse/trunk/
Or go boost: