Skip to content

Instantly share code, notes, and snippets.

@holysin
Created January 14, 2014 13:18
Show Gist options
  • Save holysin/8418175 to your computer and use it in GitHub Desktop.
Save holysin/8418175 to your computer and use it in GitHub Desktop.
Get the core number of iPhone
unsigned int countOfCores() {
unsigned int ncpu;
size_t len = sizeof(ncpu);
sysctlbyname(“hw.ncpu”, &ncpu, &len, NULL, 0);
return ncpu;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment