summaryrefslogtreecommitdiff
path: root/libguile/gc-malloc.c
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@lilypond.org>2002-08-04 14:09:14 +0000
committerHan-Wen Nienhuys <hanwen@lilypond.org>2002-08-04 14:09:14 +0000
commitc2cbcc57687ca716fb3e2166859b7be5880d80e2 (patch)
treea4a1b07da9a3bbded9d64ba5fd8b9a91bcf444ab /libguile/gc-malloc.c
parentc7743d027a335eae585335b959e483c5a6c38d36 (diff)
downloadguile-c2cbcc57687ca716fb3e2166859b7be5880d80e2.tar.gz
gc statistic tweaks
Diffstat (limited to 'libguile/gc-malloc.c')
-rw-r--r--libguile/gc-malloc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libguile/gc-malloc.c b/libguile/gc-malloc.c
index 40d4ef907..a1d8f2dc8 100644
--- a/libguile/gc-malloc.c
+++ b/libguile/gc-malloc.c
@@ -92,7 +92,7 @@ extern unsigned long * __libc_ia64_register_backing_store_base;
alloced memory, which won't go away on GC. Let's set the init such
that we get a nice yield on the next allocation:
*/
-#define SCM_DEFAULT_INIT_MALLOC_LIMIT 200000
+#define SCM_DEFAULT_INIT_MALLOC_LIMIT 200*1024
#define SCM_DEFAULT_MALLOC_MINYIELD 40
@@ -203,8 +203,8 @@ scm_gc_register_collectable_memory (void *mem, size_t size, const char *what)
scm_igc (what);
scm_i_sweep_all_segments("mtrigger");
- yield = (prev_alloced - scm_mallocated) / (float) prev_alloced;
-
+ yield = (prev_alloced - scm_mallocated) / (float) prev_alloced;
+ scm_gc_malloc_yield_percentage = (int) (100 * yield);
/*
fprintf (stderr, "prev %lud , now %lud, yield %4.2lf, want %d",
prev_alloced, scm_mallocated, 100.0*yield, scm_i_minyield_malloc);
@@ -225,9 +225,9 @@ scm_gc_register_collectable_memory (void *mem, size_t size, const char *what)
/*
fprintf (stderr, "Mtrigger sweep: ineffective. New trigger %d\n", scm_mtrigger);
*/
-
-
}
+
+
}
#ifdef GUILE_DEBUG_MALLOC