Reducing the cost of garbage collecting small arrays