From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22683 invoked by alias); 9 Oct 2013 16:36:11 -0000 Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org Received: (qmail 22666 invoked by uid 48); 9 Oct 2013 16:36:11 -0000 From: "folkert at vanheusden dot com" To: java-prs@gcc.gnu.org Subject: [Bug java/58669] does not detect all cpu cores/threads Date: Wed, 09 Oct 2013 16:36:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: java X-Bugzilla-Version: 4.8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: folkert at vanheusden dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-q4/txt/msg00004.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58669 --- Comment #3 from Folkert van Heusden --- 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.