This post originated from an RSS feed registered with Java Buzz
by Fred Grott.
Original Post: Can Haz Cpu Cores
Feed Title: GrottWorkShop
Feed URL: http://shareme.github.io/atom.xml
Feed Description: Android development with a passion for Android, Java, and Agile.
As we adjust to having a large market share of devices with more than one CPU core in the market we find that we have more openGL configuration settings and options. With a little Linux/Unix knowledge we can get the number of CPU cores used on your android device.
Unix/Linux, everything is a file
All you need to remember is that on Unix and Linux systems everything is a file. This means each CPU core will, guess come on guess, have its own file. Thus all we need to do is count the number of cpu core files in a directory, measure the length and that wil give us the number of CPU cores.