doc: GTY((cache)) documentation tweak
gcc/ChangeLog: * doc/gty.texi: Add discussion of cache vs. deletable.
This commit is contained in:
parent
d5d45465b2
commit
93996cfb30
1 changed files with 7 additions and 0 deletions
|
@ -306,6 +306,13 @@ called on that variable between the mark and sweep phases of garbage
|
|||
collection. The gt_clear_cache function is free to mark blocks as used, or to
|
||||
clear pointers in the variable.
|
||||
|
||||
In a hash table, the @samp{gt_cleare_cache} function discards entries
|
||||
if the key is not marked, or marks the value if the key is marked.
|
||||
|
||||
Note that caches should generally use @code{deletable} instead;
|
||||
@code{cache} is only preferable if the value is impractical to
|
||||
recompute from the key when needed.
|
||||
|
||||
@findex deletable
|
||||
@item deletable
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue