In a computer system that uses a generational garbage collector in which objects
are promoted from a "young" generation to an "old" generation, a compiler output
designates certain dynamic-allocation instructions as being ones whose resultant
allocated objects will be considered "pinned." The compiler associates with such
allocation instructions respective segments of the code following the instructions
and objects allocated within one of those segments are considered to remain pinned
until program execution passes beyond that segment. The garbage collector refrains
from promoting any pinned object, and as a consequence, an instruction that writes
a reference into an object field while that object is pinned does not need to be
accompanied by a write barrier.