1 USING: help.markup help.syntax memory sequences ;
4 ARTICLE: "tools.memory" "Object memory tools"
5 "You can print object heap status information:"
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:"
17 "The garbage collector can be invoked manually:"
19 { $see-also "images" } ;
24 { $description "Prints an overview of memory usage broken down by generation and zone." } ;
26 { data-room code-room room. } related-words
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." } ;
33 { $description "For each class, prints the number of instances and total memory consumed by those instances." } ;
35 { heap-stats heap-stats. } related-words