Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Determine number of cores



Hello.
I need to detect number of cores per processor programmatically. I already tried:


int procCount = 0;
size_t length = sizeof(procCount);
int error = sysctlbyname("hw.physicalcpu", &procCount, &length, NULL, 0);


with "hw.physicalcpu", "hw.logicalcpu", but I always got 4 on my MacPro.

Also MPProcessors() returns 4.

	Thanks in advance for any suggestions.
		Valda
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.