1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

* gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.

(tag_table_to_type_alist): ignore unknown types.

* gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
statistics on the number of live objects of each type.

* gc-card.c (scm_i_tag_name):  new function.
(scm_i_card_statistics): new function.
This commit is contained in:
Han-Wen Nienhuys 2005-01-27 22:44:43 +00:00
parent 8b378a5f48
commit 73a4c24e41
2 changed files with 6 additions and 2 deletions

View file

@ -414,7 +414,7 @@ scm_i_tag_name (scm_t_bits tag)
break; break;
} }
return "unknown type"; return NULL;
} }

View file

@ -280,7 +280,11 @@ static SCM
tag_table_to_type_alist (void *closure, SCM key, SCM val, SCM acc) tag_table_to_type_alist (void *closure, SCM key, SCM val, SCM acc)
{ {
scm_t_bits c_tag = scm_to_int (key); scm_t_bits c_tag = scm_to_int (key);
key = scm_from_locale_string (scm_i_tag_name (c_tag));
char const * name = scm_i_tag_name (c_tag);
if (name != NULL)
key = scm_from_locale_string (name);
return scm_cons (scm_cons (key, val), acc); return scm_cons (scm_cons (key, val), acc);
} }