diff options
author | Han-Wen Nienhuys <hanwen@lilypond.org> | 2003-05-15 22:48:20 +0000 |
---|---|---|
committer | Han-Wen Nienhuys <hanwen@lilypond.org> | 2003-05-15 22:48:20 +0000 |
commit | 0068984be5fea71da7a625974a63f6b5b94768e5 (patch) | |
tree | 5b0f821926b0694d217a8727eb96e40356794658 /libguile/srcprop.c | |
parent | 131805f0cdb6ee2b528b4e806055731375296f4c (diff) | |
download | guile-0068984be5fea71da7a625974a63f6b5b94768e5.tar.gz |
(scm_finish_srcprop): use
scm_gc_register_collectable_memory()
(scm_make_srcprops): idem.
Diffstat (limited to 'libguile/srcprop.c')
-rw-r--r-- | libguile/srcprop.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libguile/srcprop.c b/libguile/srcprop.c index 87407f294..019e8ba35 100644 --- a/libguile/srcprop.c +++ b/libguile/srcprop.c @@ -114,7 +114,8 @@ scm_make_srcprops (long line, int col, SCM filename, SCM copy, SCM plist) SCM_SYSCALL (mem = (scm_t_srcprops_chunk *) scm_malloc (n)); if (mem == NULL) scm_memory_error ("srcprops"); - scm_mallocated += n; + scm_gc_register_collectable_memory (mem, n, "srcprops"); + mem->next = srcprops_chunklist; srcprops_chunklist = mem; ptr = &mem->srcprops[0]; @@ -319,12 +320,13 @@ void scm_finish_srcprop () { register scm_t_srcprops_chunk *ptr = srcprops_chunklist, *next; + size_t n= sizeof (scm_t_srcprops_chunk) + + sizeof (scm_t_srcprops) * (SRCPROPS_CHUNKSIZE - 1); while (ptr) { next = ptr->next; + scm_gc_unregister_collectable_memory (ptr, n, "srcprops"); free ((char *) ptr); - scm_mallocated -= sizeof (scm_t_srcprops_chunk) - + sizeof (scm_t_srcprops) * (SRCPROPS_CHUNKSIZE - 1); ptr = next; } } |