This is the mail archive of the guile@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]

Re: Calling Scheme from C and Garbage Collection


Mikael Djurfeldt <mdj@nada.kth.se> writes:

> Tel <telford@eng.uts.edu.au> writes:
> 
[ ... ]
> > How about a global flag that switches on and off the constant
> > garbage collecting behaviour
> 
> I think the test for this flag in SCM_NEWCELL would degrade
> performance, since consing is done so often.

One could just have a flag used by the gc, to tell it not to link all
the free cells into the free list.  This way, SCM_NEWCELL need only
check for a null free list, as before.  In the degenerate case, the
list would always be null.