• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Determining if a user's comp has 2 processors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determining if a user's comp has 2 processors


  • Subject: Re: Determining if a user's comp has 2 processors
  • From: Shaun Wexler <email@hidden>
  • Date: Sat, 8 Mar 2003 12:44:46 -0800

On Saturday, March 8, 2003, at 01:09 AM, Simone Manganelli wrote:

What's the best way to quickly figure out if the user's computer has 2 processors or not? Any suggestions would be great.

#import <sys/sysctl.h>

+ (int) numberOfProcessors
{
int processors, error, selectors[2] = { CTL_HW, HW_NCPU };
size_t datasize = sizeof(processors);
error = sysctl(selectors, 2, &processors, &datasize, 0, 0);

return processors;
}
--
Shaun Wexler
MacFOH
http://www.macfoh.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Determining if a user's comp has 2 processors (From: Simone Manganelli <email@hidden>)

  • Prev by Date: Re: Never ending lack of memory
  • Next by Date: Getting bits from NSQuickDrawView
  • Previous by thread: Re: Determining if a user's comp has 2 processors
  • Next by thread: Re: Determining if a user's comp has 2 processors
  • Index(es):
    • Date
    • Thread