This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA/JVMTI] Implement DisposeEnvironment


Hi,

As promised, this implements the JVMTI function DisposeEnvironment, which disposes of a JVMTI environment.

[I will be following with several low-hanging-fruit-type patches implementing some of the simpler JVTMI functions.]

Keith

ChangeLog
2006-07-20  Keith Seitz  <keiths@redhat.com>

        * jvmti.cc (_Jv_JVMTI_DisposeEnvironment): New function.
        (_Jv_JVMTI_Interface): Define DisposeEnvironment method.
Index: jvmti.cc
===================================================================
--- jvmti.cc	(revision 115629)
+++ jvmti.cc	(working copy)
@@ -16,6 +16,14 @@
 #define RESERVED NULL
 #define UNIMPLEMENTED NULL
 
+static jvmtiError
+_Jv_JVMTI_DisposeEnvironment (jvmtiEnv *env)
+{
+  // All we need to do is free memory allocated by _Jv_GetJVMTIEnv
+  _Jv_Free (env);
+  return JVMTI_ERROR_NONE;
+}
+
 struct _Jv_jvmtiEnv _Jv_JVMTI_Interface =
 {
   RESERVED,			// reserved1
@@ -144,7 +152,7 @@
   UNIMPLEMENTED,		// GetExtensionFunctions
   UNIMPLEMENTED,		// GetExtensionEvents
   UNIMPLEMENTED,		// SetExtensionEventCallback
-  UNIMPLEMENTED,		// DisposeEnvironment
+  _Jv_JVMTI_DisposeEnvironment,	// DisposeEnvironment
   UNIMPLEMENTED,		// GetErrorName
   UNIMPLEMENTED,		// GetJLocationFormat
   UNIMPLEMENTED,		// GetSystemProperties

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]