When a region dies, all the objects in it are known to be dead , whether reachable or not. In this way, region inference occupies a middle ground between stack allocation and heap allocation . Mads Tofte, Jean-Pierre Talpin. Region-Based Memory Management . Please see our feedback page for submission information.
More complicated schemes are also possible.
This partitioning provides a separation of concerns between the compiler and the garbage collector . The garbage collector can trust that the registers it looks at always contain valid data, and can perform exact garbage collection . Relocation is often performed to avoid external fragmentation . Program loading sometimes relocates code and static data. A remembered set is the technique of keeping a separate list of interesting references between two sets of objects , so you don't have to find them by scanning .