]> gitweb.factorcode.org Git - factor.git/blob - basis/tools/memory/memory-docs.factor
821a6ca7f529d07016e51f0ad0900d783ff53cb0
[factor.git] / basis / tools / memory / memory-docs.factor
1 USING: help.markup help.syntax memory sequences ;
2 IN: tools.memory
3
4 ARTICLE: "tools.memory" "Object memory tools"
5 "You can print object heap status information:"
6 { $subsection room. }
7 { $subsection heap-stats. }
8 { $subsection heap-stats }
9 "You can query memory status:"
10 { $subsection data-room }
11 { $subsection code-room }
12 "There are a pair of combinators, analogous to " { $link each } " and " { $link filter } ", which operate on the entire collection of objects in the object heap:"
13 { $subsection each-object }
14 { $subsection instances }
15 "You can check an object's the heap memory usage:"
16 { $subsection size }
17 "The garbage collector can be invoked manually:"
18 { $subsection gc }
19 { $see-also "images" } ;
20
21 ABOUT: "tools.memory"
22
23 HELP: room.
24 { $description "Prints an overview of memory usage broken down by generation and zone." } ;
25
26 { data-room code-room room. } related-words
27
28 HELP: heap-stats
29 { $values { "counts" "an assoc mapping class words to integers" } { "sizes" "an assoc mapping class words to integers" } }
30 { $description "Outputs a pair of assocs holding class instance counts and instance memory usage, respectively." } ;
31
32 HELP: heap-stats.
33 { $description "For each class, prints the number of instances and total memory consumed by those instances." } ;
34
35 { heap-stats heap-stats. } related-words