summaryrefslogtreecommitdiff
path: root/doc/ref/api-memory.texi
diff options
context:
space:
mode:
authorMarius Vollmer <mvo@zagadka.de>2004-08-10 14:14:46 +0000
committerMarius Vollmer <mvo@zagadka.de>2004-08-10 14:14:46 +0000
commita90968fabb5a9f7131c9f3604b9bac99c24df713 (patch)
treed695f12c5bd855ad75b9e7049fa07dfe489b058a /doc/ref/api-memory.texi
parent7f9994d90437cfdaf6d733b9c3b050d66326f3bb (diff)
downloadguile-a90968fabb5a9f7131c9f3604b9bac99c24df713.tar.gz
Docs for scm_frame_free.
Diffstat (limited to 'doc/ref/api-memory.texi')
-rw-r--r--doc/ref/api-memory.texi11
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/ref/api-memory.texi b/doc/ref/api-memory.texi
index 7be8d4243..62bc23ec6 100644
--- a/doc/ref/api-memory.texi
+++ b/doc/ref/api-memory.texi
@@ -121,6 +121,9 @@ in place of @code{realloc} when appropriate, @code{scm_gc_calloc} and
@code{scm_calloc}, to be used in place of @code{calloc} when
appropriate.
+There function @code{scm_frame_free} can be useful when memory should
+be freed when a frame is left, @xref{Frames}.
+
For really specialized needs, take at look at
@code{scm_gc_register_collectable_memory} and
@code{scm_gc_unregister_collectable_memory}.
@@ -135,7 +138,7 @@ memory when it deems it appropriate.
The memory is allocated by the libc @code{malloc} function and can be
freed with @code{free}. There is no @code{scm_free} function to go
with @code{scm_malloc} to make it easier to pass memory back and forth
-between different modules.
+between different modules.
The function @code{scm_calloc} is similar to @code{scm_malloc}, but
initializes the block of memory to zero as well.
@@ -202,6 +205,12 @@ frees us from tracking this value in the GC itself, which will keep
the memory management overhead very low.
@end deftypefn
+@deftypefn {C Function} void scm_frame_free (void *mem)
+Equivalent to @code{scm_frame_unwind_handler (free, @var{mem},
+SCM_F_WIND_EXPLICITLY)}. That is, the memory block at @var{mem} will
+be freed when the current frame is left.
+@end deftypefn
+
@deffn {Scheme Procedure} malloc-stats
Return an alist ((@var{what} . @var{n}) ...) describing number
of malloced objects.