1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 22:10:21 +02:00

* 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.
This commit is contained in:
Jim Blandy 1996-11-10 20:46:11 +00:00
parent 448a3bc269
commit 88256b2e0e
2 changed files with 8 additions and 0 deletions

View file

@ -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));

View file

@ -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