+2000-04-21 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
+
+ * acconfig.h (GUILE_DEBUG_MALLOC): New.
+
+ * configure.in: New --enable-debug-malloc configuration option.
+
2000-03-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
* acconfig.h (GUILE_PTHREAD_COMPAT): New config variable.
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!'.
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.
+2000-04-21 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
+
+ * 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 <D.Herrmann@tu-bs.de>
* numbers.c (scm_exact_p, scm_odd_p, scm_even_p): Added