guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unordered finalization, SMOBs, finalizers, and mark functions


From: Ludovic Courtès
Subject: Re: Unordered finalization, SMOBs, finalizers, and mark functions
Date: Wed, 04 Mar 2015 11:10:58 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Andy Wingo <address@hidden> skribis:

> Open question: should Guile configure the BDW GC in a different way?
> Topological finalization is desirable for all the reasons Boehm links in
> that first article.  Should it allow the user to configure it?  I
> believe it is currently unordered due to issues with guardians, but I
> don't recall correctly.

Right, I initially wanted to enable it but it turned out to be a can of
worms.

I’ve just run the test suite with this patch:

diff --git a/libguile/gc.c b/libguile/gc.c
index 097cb3d..78999c2 100644
--- a/libguile/gc.c
+++ b/libguile/gc.c
@@ -609,6 +609,7 @@ scm_storage_prehistory ()
   target_free_space_divisor = free_space_divisor;
   GC_set_free_space_divisor (free_space_divisor);
   GC_set_finalize_on_demand (1);
+  GC_set_java_finalization (1);
 
   GC_INIT ();
 
And it actually passes.  I suspect that only means we don’t have good
tests for all these things, and those we have typically throw
'unresolved when they get an unexpected result.

As you note, the problem may be with user code more than with Guile’s
own uses.  It seems hard to assess the effect of such a change on “real
applications.”

In short, I think it would take a lot of investigation and testing to
convince ourselves that this is a reasonable change.

WDYT?

Ludo’.

[0] http://lists.gnu.org/archive/html/guile-devel/2008-11/msg00009.html

reply via email to

[Prev in Thread] Current Thread [Next in Thread]