attempt to handle steady-state mallocations better
authorAndy Wingo <wingo@pobox.com>
Tue, 29 Nov 2011 20:36:31 +0000 (21:36 +0100)
committerAndy Wingo <wingo@pobox.com>
Tue, 29 Nov 2011 20:36:31 +0000 (21:36 +0100)
commitfd51e66190bde8cef74fec9725de4da3471901c4
tree3fdacb8207c0579c81fcd9fc8117cce5ddcf95b3
parent9f7537dcabbded64afd631c0d57c84aced8173c5
attempt to handle steady-state mallocations better

* libguile/gc-malloc.c (scm_realloc): Call the new
  scm_gc_register_allocation() here.  If we have to collect, do a
  GC_gcollect_and_unmap.

* libguile/gc.c (scm_gc_register_allocation): Add a routine to track
  steady-state mallocation, and cause gc to run if there is a high
  mallocation rate.
  (adjust_gc_frequency): Reset the bytes-until-GC countdown timer.
libguile/gc-malloc.c
libguile/gc.c
libguile/gc.h