/[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.1.2.3 by ttn, Tue Jan 8 09:22:37 2002 UTC revision 1.1.2.4 by ossau, Fri Mar 15 09:23:18 2002 UTC
# Line 15  Line 15 
15  [FIXME: this is pasted in from Tom Lord's original guile.texi and should  [FIXME: this is pasted in from Tom Lord's original guile.texi and should
16  be reviewed]  be reviewed]
17    
18  @deffn primitive gc  @deffn {Scheme Procedure} gc
19    @deffnx {C Function} scm_gc ()
20  Scans all of SCM objects and reclaims for further use those that are  Scans all of SCM objects and reclaims for further use those that are
21  no longer accessible.  no longer accessible.
22  @end deffn  @end deffn
23    
24  @deffn primitive gc-stats  @deffn {Scheme Procedure} gc-stats
25    @deffnx {C Function} scm_gc_stats ()
26  Return an association list of statistics about Guile's current  Return an association list of statistics about Guile's current
27  use of storage.  use of storage.
28  @end deffn  @end deffn
29    
30  @deffn primitive object-address obj  @deffn {Scheme Procedure} object-address obj
31    @deffnx {C Function} scm_object_address (obj)
32  Return an integer that for the lifetime of @var{obj} is uniquely  Return an integer that for the lifetime of @var{obj} is uniquely
33  returned by this function for @var{obj}  returned by this function for @var{obj}
34  @end deffn  @end deffn
35    
36  @deffn primitive unhash-name name  @deffn {Scheme Procedure} unhash-name name
37  Flushes the glocs for @var{name}, or all glocs if @var{name}  Flushes the glocs for @var{name}, or all glocs if @var{name}
38  is @code{#t}.  is @code{#t}.
39  @end deffn  @end deffn
# Line 84  they constitute a doubly-weak table has Line 87  they constitute a doubly-weak table has
87  @node Weak key hashes  @node Weak key hashes
88  @subsection Weak key hashes  @subsection Weak key hashes
89    
90  @deffn primitive make-weak-key-hash-table size  @deffn {Scheme Procedure} make-weak-key-hash-table size
91  @deffnx primitive make-weak-value-hash-table size  @deffnx {Scheme Procedure} make-weak-value-hash-table size
92  @deffnx primitive make-doubly-weak-hash-table size  @deffnx {Scheme Procedure} make-doubly-weak-hash-table size
93    @deffnx {C Function} scm_make_weak_key_hash_table (size)
94  Return a weak hash table with @var{size} buckets. As with any  Return a weak hash table with @var{size} buckets. As with any
95  hash table, choosing a good size for the table requires some  hash table, choosing a good size for the table requires some
96  caution.  caution.
# Line 95  You can modify weak hash tables in exact Line 99  You can modify weak hash tables in exact
99  would modify regular hash tables. (@pxref{Hash Tables})  would modify regular hash tables. (@pxref{Hash Tables})
100  @end deffn  @end deffn
101    
102  @deffn primitive weak-key-hash-table? obj  @deffn {Scheme Procedure} weak-key-hash-table? obj
103  @deffnx primitive weak-value-hash-table? obj  @deffnx {Scheme Procedure} weak-value-hash-table? obj
104  @deffnx primitive doubly-weak-hash-table? obj  @deffnx {Scheme Procedure} doubly-weak-hash-table? obj
105    @deffnx {C Function} scm_weak_key_hash_table_p (obj)
106  Return @code{#t} if @var{obj} is the specified weak hash  Return @code{#t} if @var{obj} is the specified weak hash
107  table. Note that a doubly weak hash table is neither a weak key  table. Note that a doubly weak hash table is neither a weak key
108  nor a weak value hash table.  nor a weak value hash table.
109  @end deffn  @end deffn
110    
111  @deffn primitive make-weak-value-hash-table k  @deffn {Scheme Procedure} make-weak-value-hash-table k
112  @end deffn  @end deffn
113    
114  @deffn primitive weak-value-hash-table? x  @deffn {Scheme Procedure} weak-value-hash-table? x
115  @end deffn  @end deffn
116    
117  @deffn primitive make-doubly-weak-hash-table k  @deffn {Scheme Procedure} make-doubly-weak-hash-table k
118  @end deffn  @end deffn
119    
120  @deffn primitive doubly-weak-hash-table? x  @deffn {Scheme Procedure} doubly-weak-hash-table? x
121  @end deffn  @end deffn
122    
123    
# Line 122  nor a weak value hash table. Line 127  nor a weak value hash table.
127  Weak vectors are mainly useful in Guile's implementation of weak hash  Weak vectors are mainly useful in Guile's implementation of weak hash
128  tables.  tables.
129    
130  @deffn primitive make-weak-vector size [fill]  @deffn {Scheme Procedure} make-weak-vector size [fill]
131    @deffnx {C Function} scm_make_weak_vector (size, fill)
132  Return a weak vector with @var{size} elements. If the optional  Return a weak vector with @var{size} elements. If the optional
133  argument @var{fill} is given, all entries in the vector will be  argument @var{fill} is given, all entries in the vector will be
134  set to @var{fill}. The default value for @var{fill} is the  set to @var{fill}. The default value for @var{fill} is the
135  empty list.  empty list.
136  @end deffn  @end deffn
137    
138  @deffn primitive weak-vector . l  @deffn {Scheme Procedure} weak-vector . l
139  @deffnx primitive list->weak-vector l  @deffnx {Scheme Procedure} list->weak-vector l
140    @deffnx {C Function} scm_weak_vector (l)
141  Construct a weak vector from a list: @code{weak-vector} uses  Construct a weak vector from a list: @code{weak-vector} uses
142  the list of its arguments while @code{list->weak-vector} uses  the list of its arguments while @code{list->weak-vector} uses
143  its only argument @var{l} (a list) to construct a weak vector  its only argument @var{l} (a list) to construct a weak vector
144  the same way @code{list->vector} would.  the same way @code{list->vector} would.
145  @end deffn  @end deffn
146    
147  @deffn primitive weak-vector? obj  @deffn {Scheme Procedure} weak-vector? obj
148    @deffnx {C Function} scm_weak_vector_p (obj)
149  Return @code{#t} if @var{obj} is a weak vector. Note that all  Return @code{#t} if @var{obj} is a weak vector. Note that all
150  weak hashes are also weak vectors.  weak hashes are also weak vectors.
151  @end deffn  @end deffn
# Line 146  weak hashes are also weak vectors. Line 154  weak hashes are also weak vectors.
154  @node Guardians  @node Guardians
155  @section Guardians  @section Guardians
156    
157  @deffn primitive make-guardian [greedy?]  @deffn {Scheme Procedure} make-guardian [greedy?]
158    @deffnx {C Function} scm_make_guardian (greedy_p)
159  Create a new guardian.  Create a new guardian.
160  A guardian protects a set of objects from garbage collection,  A guardian protects a set of objects from garbage collection,
161  allowing a program to apply cleanup or other actions.  allowing a program to apply cleanup or other actions.
# Line 174  and Implementation, June 1993. Line 183  and Implementation, June 1993.
183  paper still (mostly) accurately describes the interface).  paper still (mostly) accurately describes the interface).
184  @end deffn  @end deffn
185    
186  @deffn primitive destroy-guardian! guardian  @deffn {Scheme Procedure} destroy-guardian! guardian
187    @deffnx {C Function} scm_destroy_guardian_x (guardian)
188  Destroys @var{guardian}, by making it impossible to put any more  Destroys @var{guardian}, by making it impossible to put any more
189  objects in it or get any objects from it.  It also unguards any  objects in it or get any objects from it.  It also unguards any
190  objects guarded by @var{guardian}.  objects guarded by @var{guardian}.
191  @end deffn  @end deffn
192    
193  @deffn primitive guardian-greedy? guardian  @deffn {Scheme Procedure} guardian-greedy? guardian
194    @deffnx {C Function} scm_guardian_greedy_p (guardian)
195  Return @code{#t} if @var{guardian} is a greedy guardian, otherwise @code{#f}.  Return @code{#t} if @var{guardian} is a greedy guardian, otherwise @code{#f}.
196  @end deffn  @end deffn
197    
198  @deffn primitive guardian-destroyed? guardian  @deffn {Scheme Procedure} guardian-destroyed? guardian
199    @deffnx {C Function} scm_guardian_destroyed_p (guardian)
200  Return @code{#t} if @var{guardian} has been destroyed, otherwise @code{#f}.  Return @code{#t} if @var{guardian} has been destroyed, otherwise @code{#f}.
201  @end deffn  @end deffn
202    
# Line 193  Return @code{#t} if @var{guardian} has b Line 205  Return @code{#t} if @var{guardian} has b
205  @node Objects  @node Objects
206  @chapter Objects  @chapter Objects
207    
208  @deffn primitive entity? obj  @deffn {Scheme Procedure} entity? obj
209    @deffnx {C Function} scm_entity_p (obj)
210  Return @code{#t} if @var{obj} is an entity.  Return @code{#t} if @var{obj} is an entity.
211  @end deffn  @end deffn
212    
213  @deffn primitive operator? obj  @deffn {Scheme Procedure} operator? obj
214    @deffnx {C Function} scm_operator_p (obj)
215  Return @code{#t} if @var{obj} is an operator.  Return @code{#t} if @var{obj} is an operator.
216  @end deffn  @end deffn
217    
218  @deffn primitive set-object-procedure! obj proc  @deffn {Scheme Procedure} set-object-procedure! obj proc
219    @deffnx {C Function} scm_set_object_procedure_x (obj, proc)
220  Set the object procedure of @var{obj} to @var{proc}.  Set the object procedure of @var{obj} to @var{proc}.
221  @var{obj} must be either an entity or an operator.  @var{obj} must be either an entity or an operator.
222  @end deffn  @end deffn
223    
224  @deffn primitive make-class-object metaclass layout  @deffn {Scheme Procedure} make-class-object metaclass layout
225    @deffnx {C Function} scm_make_class_object (metaclass, layout)
226  Create a new class object of class @var{metaclass}, with the  Create a new class object of class @var{metaclass}, with the
227  slot layout specified by @var{layout}.  slot layout specified by @var{layout}.
228  @end deffn  @end deffn
229    
230  @deffn primitive make-subclass-object class layout  @deffn {Scheme Procedure} make-subclass-object class layout
231    @deffnx {C Function} scm_make_subclass_object (class, layout)
232  Create a subclass object of @var{class}, with the slot layout  Create a subclass object of @var{class}, with the slot layout
233  specified by @var{layout}.  specified by @var{layout}.
234  @end deffn  @end deffn

Legend:
Removed from v.1.1.2.3  
changed lines
  Added in v.1.1.2.4

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