/[guile]/guile/guile-core/doc/ref/scheme-memory.texi
ViewVC logotype

Diff of /guile/guile-core/doc/ref/scheme-memory.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by mvo, Mon Aug 5 18:50:54 2002 UTC revision 1.10 by hanwen, Mon Aug 5 23:04:43 2002 UTC
# Line 7  This means that the memory used to store Line 7  This means that the memory used to store
7  automatically reclaimed when no one is using this string any longer.  automatically reclaimed when no one is using this string any longer.
8  This can work because Guile knows enough about its objects at run-time  This can work because Guile knows enough about its objects at run-time
9  to be able to trace all references between them.  Thus, it can find  to be able to trace all references between them.  Thus, it can find
10  all 'life' objects (objects that are still in use) by starting from a  all 'live' objects (objects that are still in use) by starting from a
11  known set of 'root' objects and following the links that these objects  known set of 'root' objects and following the links that these objects
12  have to other objects, and so on.  The objects that are not reached by  have to other objects, and so on.  The objects that are not reached by
13  this recursive process can be considered 'dead' and their memory can  this recursive process can be considered 'dead' and their memory can
14  be used for new objects.  be  reused for new objects.
15    
16  When you are programming in Scheme, you don't need to worry about the  When you are programming in Scheme, you don't need to worry about the
17  garbage collector.  When programming in C, there are a few rules that  garbage collector.  When programming in C, there are a few rules that
# Line 67  be freed by a garbage collection.  The m Line 67  be freed by a garbage collection.  The m
67  @code{free}.  @code{free}.
68    
69  There is also @code{scm_gc_realloc} and @code{scm_realloc}, to be used  There is also @code{scm_gc_realloc} and @code{scm_realloc}, to be used
70  in place of @code{realloc} when appropriate.  in place of @code{realloc} when appropriate, @code{scm_gc_calloc} and
71    @code{scm_calloc}, to be used in place of @code{calloc} when
72    appropriate.
73    
74  For really specialized needs, take at look at  For really specialized needs, take at look at
75  @code{scm_gc_register_collectable_memory} and  @code{scm_gc_register_collectable_memory} and

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26