harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Fedotov" <alexei.fedo...@gmail.com>
Subject DestroyJavaVM, System.exit, etc
Date Sat, 09 Feb 2008 13:34:45 GMT
Hello, folks,
I have some problems trying to understand the current Harmony VM
shutdown mechanism. I would appreciate any help from you.

   * What is a correct place to put my own C shutdown code?
   * Why does VM detach the main thread from both the launcher and
vm_destroy function?
   * What is the reason for the global monitor locks and unlocks in
the following function? What means the comment about jobjectArray?
JNIEXPORT void JNICALL Java_java_lang_VMExecutionEngine_exit
  (JNIEnv * jni_env, jclass, jint status, jboolean needFinalization,
jobjectArray)
{
    // ToDo: process jobjectArray
    hythread_global_lock();
    _exit(status);
    hythread_global_unlock();
}
   * Where are VM resources reclaimed on shutdown? I found the only
apr_pool_destroy(java_vm->pool) in DestroyJavaVM(). Are there any
other places?

Thanks!
-- 
With best regards,
Alexei

Mime
View raw message