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

Re: guile/guile-core/libguile init.c



In his thesis, Ben Zorn recommends that one should not GC when the
freelist is exhausted.  If you do this, then programs whose data size
is close to the current heap size will GC very frequently, because the
freelists will always be short.  And since these GC's will reclaim
very little storage, the time they take is pretty much wasted.

He suggests that the program should instead expand the heap whenever
the freelist is exhausted, and GC after every N allocations, where N
is a parameter.  This way, the heap size naturally adjusts to match
the program's data size, and the GC frequency is more controlled.

> CVSROOT:	/cvs/guile
> Module name:	guile
> Changes by:	mdj@sourceware.cygnus.com	00/03/14 07:12:12
> 
> Modified files:
> 	guile-core/libguile: init.c 
> 
> Log message:
> 	* init.c (scm_boot_guile_1): Use same initial segment size for
> 	1-word and 2-word segments.  Having the smaller size causes Guile
> 	to GC too often.  Obviously something needs to be done to allow
> 	for a smaller 2-word segment without this to happen.  (The amount
> 	of heap for each type should be automatically adapted to the
> 	application somehow.)

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