diff options
author | Jim Blandy <jimb@red-bean.com> | 1996-11-10 20:46:11 +0000 |
---|---|---|
committer | Jim Blandy <jimb@red-bean.com> | 1996-11-10 20:46:11 +0000 |
commit | 88256b2e0e97ea0ee59906b279d8e78c6d413daf (patch) | |
tree | 246790eed0b02308734b33a7a9d569485af1d0cd | |
parent | 448a3bc26902a8d61506bf9bff6a3d54d039505b (diff) | |
download | guile-88256b2e0e97ea0ee59906b279d8e78c6d413daf.tar.gz |
* gc.c (which_seg, scm_map_free_list, scm_newcell_count,
scm_check_freelist, scm_debug_newcell): New functions and
variables, for debugging freelist problems.
* pairs.h (SCM_NEWCELL): New debugging version added.
* gc.h (scm_debug_newcell): Added extern declaration, used by
debugging version of SCM_NEWCELL.
-rw-r--r-- | libguile/gc.h | 4 | ||||
-rw-r--r-- | libguile/pairs.h | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/libguile/gc.h b/libguile/gc.h index d989b06c7..0a1f20549 100644 --- a/libguile/gc.h +++ b/libguile/gc.h @@ -68,6 +68,10 @@ extern unsigned long scm_cells_allocated; extern unsigned long scm_mallocated; extern long scm_mtrigger; +#ifdef DEBUG_FREELIST +extern void scm_debug_newcell SCM_P ((SCM *into)); +#endif + extern SCM scm_object_addr SCM_P ((SCM obj)); diff --git a/libguile/pairs.h b/libguile/pairs.h index 4b7af0b26..ec074f77b 100644 --- a/libguile/pairs.h +++ b/libguile/pairs.h @@ -144,6 +144,9 @@ typedef SCM huge *SCMPTR; #define SCM_CDDDDR(OBJ) SCM_CDR (SCM_CDR (SCM_CDR (SCM_CDR (OBJ)))) +#ifdef DEBUG_FREELIST +#define SCM_NEWCELL(_into) (scm_debug_newcell (&_into)) +#else #define SCM_NEWCELL(_into) \ { \ if (SCM_IMP(scm_freelist)) \ @@ -155,6 +158,7 @@ typedef SCM huge *SCMPTR; ++scm_cells_allocated; \ } \ } +#endif |