1 USING: help.markup help.syntax memory sequences vm ;
4 ARTICLE: "tools.memory" "Object memory tools"
5 "You can print object heap status information:"
11 "You can query memory status:"
16 "A combinator to get objects from the heap:"
17 { $subsections instances }
18 "You can check an object's the heap memory usage:"
20 "The garbage collector can be invoked manually:"
22 { $see-also "images" } ;
27 { $description "Prints an overview of memory usage broken down by generation and zone." } ;
29 { data-room code-room room. } related-words
32 { $values { "counts" "an assoc mapping class words to integers" } { "sizes" "an assoc mapping class words to integers" } }
33 { $description "Outputs a pair of assocs holding class instance counts and instance memory usage, respectively." } ;
36 { $description "For each class, prints the number of instances and total memory consumed by those instances." } ;
38 { heap-stats heap-stats. } related-words
41 { $description "Prints all garbage collection events that took place during the last call to " { $link collect-gc-events } "." } ;
44 { $description "Prints a breakdown of different garbage collection events that took place during the last call to " { $link collect-gc-events } "." } ;
47 { $description "Prints aggregate garbage collection statistics from the last call to " { $link collect-gc-events } "." } ;
50 { $var-description "A sequence of " { $link gc-event } " instances, set by " { $link collect-gc-events } ". Can be inspected directly, or with the " { $link gc-events. } ", " { $link gc-stats. } " and " { $link gc-summary. } " words." } ;