0 Replies Latest reply on Aug 16, 2007 9:21 AM by 843810

    memory usage in jvmti

      I'm writing a profiler using Jvmti on windows that does not seem to free all the memory when I make repeated calls to getallthreads. I have reduced the code to the following:

      jint count=0;
      jthread* thread_list_ptr;
      jvmtiError err = jvmti_env->GetAllThreads(&count,&thread_list_ptr);
      for(int i=0;i<count;i++){
      err = jvmti_env->Deallocate((unsigned char *)thread_list_ptr);

      It look like the java heap memory is being gc but the mem of the java process itself keep rising.

      if I remove the calls to GetAllthreads and Deallocate the mem usage of the java process stays constant.