This is the mail archive of the
mailing list for the Mauve project.
Re: Mauve patch
- From: Ingo Prötel <proetel at aicas dot com>
- To: mauve-discuss at sources dot redhat dot com, commit-classpath at gnu dot org
- Date: Tue, 06 Apr 2004 14:15:35 +0200
- Subject: Re: Mauve patch
- References: <200404060330.i363UY1B018067@arch20m.dellroad.org> <email@example.com>
Sascha Brawer wrote:
Archie Cobbs <firstname.lastname@example.org> wrote on Mon, 5 Apr 2004 22:30:34 -0500:I'm not sure a wait/notify will help. It might also just hang the VM since no garbage collection
might occur. Probably the only real solution would be to force an OutOfMemoryError. Before the VM
may throw such an error it has to try to clean up memory. But probably not all VMs survive such a
Is this the right place to send Mauve patches? If not please point me
(or the patch) in the right direction.
There's a list email@example.com (presumably with mostly
the same subscribers as firstname.lastname@example.org, although there seem to
be also a few non-Classpath people there).
In JC, phantom references are enqueued on the next finalizer run
after the one that finalizes the object, and finalizer runs only
happen after a GC cycle, therefore the patch below is required to
make JC pass the test; ie, the test is being too strict.
RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/ref/PhantomReference/
retrieving revision 1.1
diff -u -r1.1 phantom.java
--- gnu/testlet/java/lang/ref/PhantomReference/phantom.java 27 Sep
2001 15:44:09 -0000 1.1
+++ gnu/testlet/java/lang/ref/PhantomReference/phantom.java 6 Apr
2004 03:28:19 -0000
@@ -70,6 +70,8 @@
PhantomReference wr = try1 (q, harness);
+ System.gc ();
Reference r = null;
Does this really guarantee that the finalizer has run? Couldn't this also
lead to any other thread, such as some VM-internal thread, without
running the finalizer? If so, you might want to call Object.notify in the
finalizer and Object.wait at the above code location.
Sascha Brawer, email@example.com, http://www.dandelis.ch/people/brawer/
Ingo Prötel firstname.lastname@example.org
aicas GmbH http://www.aicas.com
Haid-und-Neu-Str. 18 phone +49 721 663 968-32
76131 Karlsruhe fax +49 721 663 968-93