summaryrefslogtreecommitdiff
path: root/doc/ref/scheme-memory.texi
diff options
context:
space:
mode:
authorNeil Jerram <neil@ossau.uklinux.net>2002-04-20 15:52:13 +0000
committerNeil Jerram <neil@ossau.uklinux.net>2002-04-20 15:52:13 +0000
commitf2ba76aea59136a8d1ca15456c8c96545ae468da (patch)
treee26774c82751285fde67a39b87138d00ccaf7e32 /doc/ref/scheme-memory.texi
parent1982a56a975e0cc3a8c5e93ced9e7fa4ffc757d8 (diff)
downloadguile-f2ba76aea59136a8d1ca15456c8c96545ae468da.tar.gz
* Manual work on debugging infrastructure
Diffstat (limited to 'doc/ref/scheme-memory.texi')
-rw-r--r--doc/ref/scheme-memory.texi14
1 files changed, 11 insertions, 3 deletions
diff --git a/doc/ref/scheme-memory.texi b/doc/ref/scheme-memory.texi
index af0088692..d6f0584c6 100644
--- a/doc/ref/scheme-memory.texi
+++ b/doc/ref/scheme-memory.texi
@@ -26,6 +26,7 @@ Return an association list of statistics about Guile's current
use of storage.
@end deffn
+
@node Memory Blocks
@section Memory Blocks
@@ -80,7 +81,6 @@ When not enough memory is available, signal an error. This function
runs the GC to free up some memory when it deems it appropriate.
@end deftypefn
-
@deftypefn {C Function} void scm_gc_register_collectable_memory (void *@var{mem}, size_t @var{size}, const char *@var{what})
Informs the GC that the memory at @var{mem} of size @var{size} can
potentially be freed during a GC. That is, announce that @var{mem} is
@@ -108,7 +108,6 @@ this, the GC might have a wrong impression of what is going on and run
much less efficiently than it could.
@end deftypefn
-
@deftypefn {C Function} void *scm_gc_malloc (size_t @var{size}, const char *@var{what})
@deftypefnx {C Function} void *scm_gc_realloc (void *@var{mem}, size_t @var{old_size}, size_t @var{new_size}, const char *@var{what});
Like @code{scm_malloc} or @code{scm_realloc}, but also call
@@ -127,8 +126,16 @@ frees us from tracking this value in the GC itself, which will keep
the memory management overhead very low.
@end deftypefn
+@deffn {Scheme Procedure} malloc-stats
+Return an alist ((@var{what} . @var{n}) ...) describing number
+of malloced objects.
+@var{what} is the second argument to @code{scm_gc_malloc},
+@var{n} is the number of objects of that type currently
+allocated.
+@end deffn
+
-@subsection Upgrading from scm_must_malloc et al
+@subsection Upgrading from scm_must_malloc et al.
Version 1.6 of Guile and earlier did not have the functions from the
previous section. In their place, it had the functions
@@ -184,6 +191,7 @@ The important thing is to always pair @code{scm_malloc} with
The same reasoning applies to @code{scm_must_realloc} and
@code{scm_realloc} versus @code{scm_gc_realloc}.
+
@node Weak References
@section Weak References