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]

Re: [RFA] JVMTI/JDWP GetAllLoadedClasses


>>>>> "Kyle" == Kyle Galloway <kgallowa@redhat.com> writes:

Kyle> In order to avoid problems with circular class loading(try to
Kyle> load a class, then try to add it to the class list, whihc
Kyle> requires WeakReference to be loaded, which needs to be stored in
Kyle> the list, whichi requires WeakReference to be loaded...and so
Kyle> on), until it can be assured that WeakReference is loaded (which
Kyle> is checked in ClassList::setup ()), the classes that have been
Kyle> loaded are stored in a temporary linked list of jclass *.  When
Kyle> setup is called, these classes are transferred over to the
Kyle> WeakReference list, and the memory used by this temporary list
Kyle> is freed.

There's some code like this already in the VM startup sequence, to
handle handoff to the bootstrap class loader after it is created.
Maybe we could reuse this somehow.

Kyle> +  return (::java::util::Collection *) (cls_lst);

Just for future reference, there's no need to cast from a subclass to
a superclass.  This can be done implicitly.

Tom


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