This is the mail archive of the guile-emacs@sourceware.cygnus.com mailing list for the Guile project.


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

guile-emacs GC (was special forms)


Kalle Olavi Niemitalo <tosi@ee.oulu.fi> writes:

> Besides I don't know enough about the Emacs garbage collector.

The garbage collectors may be a larger problem than I thought...

In guileapi.c, you have a list of Emacs Lisp objects which are
being used by Guile.  This protect_list prevents Emacs from
garbage-collecting those objects and anything they point to.  It
is working fine (although lval_free() may get slow if the list is
long).

Now, if Emacs Lisp objects can also contain references to Guile
objects, there must be a mechanism to prevent Guile from
collecting those objects.  One could perhaps add a similar list
in the Guile side.

If something causes a cycle of references between Lisp and
Scheme, neither garbage collector can free the data.  It's all
locked down by the protect lists.  To detect the situation, the
garbage collectors would have to cooperate.  I'm sure that would
be a pain to code.

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