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 GC behaviour


Christian Lynbech <chl@tbit.dk> writes:

> However, the allocation of new heap segments is kind of orthogonal
> to the gc process itself. The process goes something like this: when
> gc is finished it estimates the fraction of the heap cleared up. If
> this is too small, a new heap segment is allocated.

Another issue to consider: whenever you free a smob, you're supposed
to return the ammount of memory you freed. It is critical to return
the correct value (add up /only/ the memory blocks allocated with
scm_must_malloc; you shouldn't count the ones allocated with C
malloc). Errors in this cause guile to misjudge the ammount of memory
currently allocated, and trigger gc more and more often (or, worse,
grow heap more and more often).

-- 
How to eff the ineffable?

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