diff options
author | Han-Wen Nienhuys <hanwen@lilypond.org> | 2002-09-05 20:43:43 +0000 |
---|---|---|
committer | Han-Wen Nienhuys <hanwen@lilypond.org> | 2002-09-05 20:43:43 +0000 |
commit | 61ef9c1fa379e9682326d8ee32fc5ab1d08bf0e7 (patch) | |
tree | 7d2edf9f4d94fefee552365d16470dd147a1558a /libguile/gc-malloc.c | |
parent | cfcdb8e9a70757ca0121e44ee1498c827fbe5815 (diff) | |
download | guile-61ef9c1fa379e9682326d8ee32fc5ab1d08bf0e7.tar.gz |
add DEBUGINFO for mtrigger GCs.
Diffstat (limited to 'libguile/gc-malloc.c')
-rw-r--r-- | libguile/gc-malloc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libguile/gc-malloc.c b/libguile/gc-malloc.c index 1dbb448f1..7bf366b0d 100644 --- a/libguile/gc-malloc.c +++ b/libguile/gc-malloc.c @@ -95,6 +95,7 @@ extern unsigned long * __libc_ia64_register_backing_store_base; #define SCM_DEFAULT_INIT_MALLOC_LIMIT 200*1024 #define SCM_DEFAULT_MALLOC_MINYIELD 40 +/* #define DEBUGINFO */ static int scm_i_minyield_malloc; @@ -207,11 +208,12 @@ scm_gc_register_collectable_memory (void *mem, size_t size, const char *what) yield = (prev_alloced - scm_mallocated) / (float) prev_alloced; scm_gc_malloc_yield_percentage = (int) (100 * yield); - /* + +#ifdef DEBUGINFO fprintf (stderr, "prev %lud , now %lud, yield %4.2lf, want %d", prev_alloced, scm_mallocated, 100.0*yield, scm_i_minyield_malloc); - */ - +#endif + if (yield < scm_i_minyield_malloc / 100.0) { /* @@ -224,12 +226,10 @@ scm_gc_register_collectable_memory (void *mem, size_t size, const char *what) */ scm_mtrigger = (scm_mallocated * 110) / (100 - scm_i_minyield_malloc); - /* +#ifdef DEBUGINFO fprintf (stderr, "Mtrigger sweep: ineffective. New trigger %d\n", scm_mtrigger); - */ +#endif } - - } #ifdef GUILE_DEBUG_MALLOC |