measuring the amount of garbage collected