| 1 |
= Reachability |
| 2 |
|
| 3 |
Reachability is a notion dealing with the graph of heap objects |
| 4 |
maintained at runtime. Nodes in the graph are heap objects and edges |
| 5 |
correspond to the pointers between heap objects. As the program runs, |
| 6 |
it allocates new objects (adds nodes to the graph), and those new |
| 7 |
objects can contain pointers to other objects (new edges in the |
| 8 |
graph). If the program uses mutable objects (refs or arrays), it can |
| 9 |
also change edges in the graph. |
| 10 |
|
| 11 |
At any time, the program has access to some finite set of _root_ |
| 12 |
nodes, and can only ever access nodes that are reachable by following |
| 13 |
edges from these root nodes. Nodes that are _unreachable_ can be |
| 14 |
garbage collected. |
| 15 |
|
| 16 |
== Also see |
| 17 |
|
| 18 |
* <<MLtonFinalizable#>> |
| 19 |
* <<MLtonWeak#>> |