From 9764c29b8cb268b18c850120f5f2a0929da13b3a Mon Sep 17 00:00:00 2001 From: Mikael Djurfeldt Date: Fri, 21 Apr 2000 00:27:52 +0000 Subject: [PATCH] *** empty log message *** --- ChangeLog | 6 ++++++ NEWS | 20 +++++++++++++++++++- libguile/ChangeLog | 13 +++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 94329e7a4..2c66a27d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-04-21 Mikael Djurfeldt + + * acconfig.h (GUILE_DEBUG_MALLOC): New. + + * configure.in: New --enable-debug-malloc configuration option. + 2000-03-29 Mikael Djurfeldt * acconfig.h (GUILE_PTHREAD_COMPAT): New config variable. diff --git a/NEWS b/NEWS index a1f7d10ab..3cd1859d2 100644 --- a/NEWS +++ b/NEWS @@ -42,7 +42,7 @@ features: These are likely to become separate modules some day. -** Added new configure option --enable-debug-freelist +** New configure option --enable-debug-freelist This enables a debugging version of SCM_NEWCELL(), and also registers an extra primitive, the setter `gc-set-debug-check-freelist!'. @@ -58,6 +58,24 @@ a garbage collection before each allocation of a cell. This can slow down the interpreter dramatically, so the setter should be used to turn on this extra processing only when necessary. +** New configure option --enable-debug-malloc + +Include code for debugging of calls to scm_must_malloc/realloc/free. + +Checks that + +1. objects freed by scm_must_free has been mallocated by scm_must_malloc +2. objects reallocated by scm_must_realloc has been allocated by + scm_must_malloc +3. reallocated objects are reallocated with the same what string + +But, most importantly, it records the number of allocated objects of +each kind. This is useful when searching for memory leaks. + +A Guile compiled with this option provides the primitive +`malloc-stats' which returns an alist with pairs of kind and the +number of objects of that kind. + * Changes to the stand-alone interpreter ** Dynamic linking now uses libltdl from the libtool package. diff --git a/libguile/ChangeLog b/libguile/ChangeLog index e49aa1b3a..e3294cfb6 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,16 @@ +2000-04-21 Mikael Djurfeldt + + * gc.c (scm_must_malloc, scm_must_realloc, scm_must_free): Added + calls to malloc debugging functions. + + * init.c (scm_boot_guile_1): Added calls to debug-malloc init + functions. + + * Makefile.am: Added debug-malloc.c, debug-malloc.h, + debug-malloc.x. + + * debug-malloc.c, debug-malloc.h: New files. + 2000-04-20 Dirk Herrmann * numbers.c (scm_exact_p, scm_odd_p, scm_even_p): Added -- 2.20.1