Hi, ludovic.courtes@laas.fr (Ludovic Courtès) writes: > * the heap gets more and more underutilized, although it seems to > eventually stabilize somewhere around 5% (!) utilization (i.e., > total/alive = 20); The main reason appears to be that the size of individual segments grows exponentially (it's computed in `scm_i_get_new_heap_segment ()'). This can be seen by regularly dumping the result of the following expression: (map (lambda (elem) (abs (- (cdr elem) (car elem)))) (assoc-ref (gc-stats) 'cell-heap-segments)) The default value of `scm_max_segment_size' is `SCM_DEFAULT_MAX_SEGMENT_SIZE' and is as large as 20MiB (!). Setting it to 64KiB, using the `GUILE_MAX_SEGMENT_SIZE' environment variable, reduces the total heap size (not shown here) by a factor of 2, and significantly improves the total-to-alive heap ratio: