Re: Finding number of processors
Re: Finding number of processors
- Subject: Re: Finding number of processors
- From: Shaun Wexler <email@hidden>
- Date: Wed, 16 Mar 2005 10:45:48 -0800
On Mar 16, 2005, at 10:38 AM, Michael Koehmstedt wrote:
How can I determine how many processors are present in the computer?
host_basic_info_data_t hostBasicInfo;
mach_msg_type_number_t infoCount = HOST_BASIC_INFO_COUNT;
host_info(mach_host_self(), HOST_BASIC_INFO,
(host_info_t)&hostBasicInfo, &infoCount);
UInt32 installedProcessorCount = hostBasicInfo.max_cpus;
I'm not sure how this works for dual-cores, but I believe it correctly
identifies the number of CPU's in hardware, regardless if any disabled
| inactive...
--
Shaun Wexler
MacFOH
http://www.macfoh.com
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden