This is the mail archive of the java-prs@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug java/58669] does not detect all cpu cores/threads


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]