This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [RFA] JVMTI/JDWP GetAllLoadedClasses
- From: Tom Tromey <tromey at redhat dot com>
- To: Kyle Galloway <kgallowa at redhat dot com>
- Cc: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 24 Apr 2007 15:23:46 -0600
- Subject: Re: [RFA] JVMTI/JDWP GetAllLoadedClasses
- References: <462E280A.4070206@redhat.com>
- Reply-to: tromey at redhat dot com
>>>>> "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