A system and method for adaptive or dynamic garbage collection and memory
management in computer systems and virtual machine environments,
including Java virtual machines. Adaptive techniques attempt to constrain
the system to consistently move towards the desired goal. In accordance
with an embodiment, the system successively calculates a value of error
from the "perfect state", and adjusts parameters so that this value will
be reduced on the next round of calculations. In accordance with an
embodiment, certain parameters, such as nursery size, can be defined; and
the variation in that parameter used to calculate its effect on a
particular goal, for example, the pause-time minimization. An error value
is then evaluated as the difference between the desired or "goal"
pause-time, and the current pause-time. By varying the nursery size in an
adaptive manner, the pause-time can then be minimized.