This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug java/58669] does not detect all cpu cores/threads
- From: "folkert at vanheusden dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: Wed, 09 Oct 2013 16:36:10 +0000
- Subject: [Bug java/58669] does not detect all cpu cores/threads
- Auto-submitted: auto-generated
- References: <bug-58669-8172 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58669
--- Comment #3 from Folkert van Heusden <folkert at vanheusden dot com> ---
Did some googling and with appropriate #ifdefs it should be at least on linux
possible to retrieve this value:
sysconf(_SC_NPROCESSORS_ONLN);
If that function can't figure it out, it will return '1' which is somewhat
sensible.
On
http://stackoverflow.com/questions/150355/programmatically-find-the-number-of-cores-on-a-machine
I found a whole list of implementations for windows, *bsd, macos, aix, well I
think all relevant platforms.
Also
http://stackoverflow.com/questions/4586405/get-number-of-cpus-in-linux-using-c
gives some ideas.
If there's any further help I can do; let me know.