0 Replies Latest reply: Aug 16, 2007 4:21 AM by 843810 RSS

    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.