harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Fursov" <mike.fur...@gmail.com>
Subject Re: [DRLVM][PORT] correct API to retrieve processor number
Date Wed, 01 Nov 2006 11:21:50 GMT
I've tried Runtime.getRuntime().availableProcessors() right now and it works
OK to me and reports "2". I have Prescott, 1CPU, 2 hyperthreads, WindowsXP.

JNIEXPORT jint JNICALL
Java_java_lang_VMExecutionEngine_getAvailableProcessors
  (JNIEnv *, jclass)
{
    return port_CPUs_number();
}

So if it's broken for you it's broken in Java too.

On 11/1/06, Xiao-Feng Li <xiaofeng.li@gmail.com> wrote:
>
> Hi, I am using port_CPUs_number() for GCv5 to get the processor
> number, but my desktop returns one processor with it on Windows
> although my processor is dual-core. (port_CPUs_number is defined in
> port_sysinfo.h).
>
> I think we need more general form of processor number retrieval API
> that can return processor information including that of core and
> hyperthreading.
>
> How do you think?
>
> Thanks,
> xiaofeng
>



-- 
Mikhail Fursov

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message