[Ecls-list] GC problems solved

Juan Jose Garcia-Ripoll jjgarcia at users.sourceforge.net
Sun Nov 18 17:05:09 UTC 2007


Hi,

I have solved a problem with the garbage collector statistics and
finalization code. The problem is that this code was formerlly called
from within the GC loop, which is not reentrant. In other words,
neither the statistics nor the finalization code were allowed to
allocate further memory when used in a multithreaded environment. This
was the cause of ECL hanging when using (SI:GC-STATS T) followed by
(GC T) in a multithreaded environment.

I have fixed this by:

* Allocating 128-bit bignums to gather the statistics of memory usage
and garbage collection counts. This way we need not allocate memory to
store the numbers when they become large.

* Redesigning the finalization code so that groups of objects that are
to be finalized are collected in a list and later on finalized all
together before garbage collection.

Help is welcome on further testing both solutions.

Juanjo

-- 
Facultad de Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 28040 (Spain)
http://juanjose.garciaripoll.googlepages.com




More information about the ecl-devel mailing list