title: How many cores do I have?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/150355/programmatically-find-the-number-of-cores-on-a-machine">Programmatically find the number of cores on a machine</a>  </p>
  </blockquote>
  
  
  
  <p>I have a multi-threaded C++ program that runs on Windows, MacOS and Linux.  Is there an easy way to find out how many cores the machine on which I am running currently has? My system runs best when it has 1 thread for each core.</p>