In computer science community, garbage collection is a dynamic storage management technology to ensure the reliability of computer systems. In this paper, we consider two discrete garbage collection policies to meet the goal of time consumption for a generational garbage collector. That is, garbage collections occur at a nonhomogeneous Poisson process, (a) tenuring collection is triggered at the Nth minor collection preventively or at a threshold amount [Formula: see text] of surviving objects correctively, whichever takes place first, and (b), tenuring collection is triggered at the first collection when the amount of surviving objects has exceeded a threshold level [Formula: see text] and major collection is triggered at discrete times kT for a given T. Using the damage process and renewal theory, the expected cost rates are obtained, and their optimal policies for tenuring and major collections are discussed analytically and computed numerically.