diff options
author | Ludovic Courtès <ludo@gnu.org> | 2008-10-23 17:46:08 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2008-10-23 17:46:08 +0200 |
commit | 7f9ec18a1fdd1b29a87e407d330461fa13de47b5 (patch) | |
tree | bc798f54f91b9a065d522e72f0b473c080295e97 | |
parent | c38a561f73512bfccac490b91b47ea33be907aa6 (diff) | |
download | guile-7f9ec18a1fdd1b29a87e407d330461fa13de47b5.tar.gz |
Expose `GC_dump ()' at the Scheme level.
* libguile/gc.h (scm_gc_dump): New declaration.
* libguile/gc.c (scm_gc_dump): New function.
-rw-r--r-- | libguile/gc.c | 12 | ||||
-rw-r--r-- | libguile/gc.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/libguile/gc.c b/libguile/gc.c index 7bf0987b9..bb39efd91 100644 --- a/libguile/gc.c +++ b/libguile/gc.c @@ -346,6 +346,18 @@ SCM_DEFINE (scm_gc_stats, "gc-stats", 0, 0, 0, #undef FUNC_NAME +SCM_DEFINE (scm_gc_dump, "gc-dump", 0, 0, 0, + (void), + "Dump information about the garbage collector's internal data " + "structures and memory usage to the standard output.") +#define FUNC_NAME s_scm_gc_dump +{ + GC_dump (); + + return SCM_UNSPECIFIED; +} +#undef FUNC_NAME + SCM_DEFINE (scm_object_address, "object-address", 1, 0, 0, (SCM obj), diff --git a/libguile/gc.h b/libguile/gc.h index 6b3d6a252..4692a4935 100644 --- a/libguile/gc.h +++ b/libguile/gc.h @@ -204,6 +204,7 @@ SCM_API SCM scm_set_debug_cell_accesses_x (SCM flag); SCM_API SCM scm_object_address (SCM obj); SCM_API SCM scm_gc_enable (void); SCM_API SCM scm_gc_disable (void); +SCM_API SCM scm_gc_dump (void); SCM_API SCM scm_gc_stats (void); SCM_API SCM scm_gc_live_object_stats (void); SCM_API SCM scm_gc (void); |