]> gitweb.factorcode.org Git - factor.git/blob - basis/tools/memory/memory-docs.factor
tools.memory: Fix deploy test 23
[factor.git] / basis / tools / memory / memory-docs.factor
1 USING: help.markup help.syntax memory tools.memory sequences vm ;
2 IN: tools.memory
3
4 ARTICLE: "tools.memory" "Object memory tools"
5 "You can print object heap status information:"
6 { $subsections
7     room.
8     heap-stats.
9     heap-stats
10 }
11 "You can query memory status:"
12 { $subsections
13     data-room
14     code-room
15 }
16 "A combinator to get objects from the heap:"
17 { $subsections instances }
18 "You can check an object's the heap memory usage:"
19 { $subsections size }
20 "The garbage collector can be invoked manually:"
21 { $subsections gc }
22 { $see-also "images" } ;
23
24 ABOUT: "tools.memory"
25
26 HELP: room.
27 { $description "Prints an overview of memory usage broken down by generation and zone." } ;
28
29 { data-room code-room room. } related-words
30
31 HELP: heap-stats
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." } ;
34
35 HELP: heap-stats.
36 { $description "For each class, prints the number of instances and total memory consumed by those instances." } ;
37
38 { heap-stats heap-stats. } related-words
39
40 HELP: gc-events.
41 { $description "Prints all garbage collection events that took place during the last call to " { $link collect-gc-events } "." } ;
42
43 HELP: gc-stats.
44 { $description "Prints a breakdown of different garbage collection events that took place during the last call to " { $link collect-gc-events } "." } ;
45
46 HELP: gc-summary.
47 { $description "Prints aggregate garbage collection statistics from the last call to " { $link collect-gc-events } "." } ;
48
49 HELP: 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." } ;
51
52 HELP: data-room
53 { $values { "data-heap-room" data-heap-room } }
54 { $description "Queries the VM for memory usage in the data heap." } ;
55
56 HELP: code-room
57 { $values { "mark-sweep-sizes" mark-sweep-sizes } }
58 { $description "Queries the VM for memory usage in the code heap." } ;
59
60 HELP: callback-room
61 { $values { "mark-sweep-sizes" mark-sweep-sizes } }
62 { $description "Queries the VM for memory usage in the callback heap." } ;