}
/*
- * public int availableProcessors()
- *
- * Returns the number of online processors, at least one.
- *
- */
-static void Dalvik_java_lang_Runtime_availableProcessors(const u4* args,
- JValue* pResult)
-{
- long result = 1;
-#ifdef _SC_NPROCESSORS_ONLN
- result = sysconf(_SC_NPROCESSORS_ONLN);
- if (result > INT_MAX) {
- result = INT_MAX;
- } else if (result < 1 ) {
- result = 1;
- }
-#endif
- RETURN_INT((int)result);
-}
-/*
* public long maxMemory()
*
* Returns GC heap max memory in bytes.
Dalvik_java_lang_Runtime_freeMemory },
{ "gc", "()V",
Dalvik_java_lang_Runtime_gc },
- { "availableProcessors", "()I",
- Dalvik_java_lang_Runtime_availableProcessors },
{ "maxMemory", "()J",
Dalvik_java_lang_Runtime_maxMemory },
{ "nativeExit", "(IZ)V",