The number of undo and redo operations that is allowed can be adjusted. For example, if you set the number of steps to 50, after performing the 50th step, the 1st step will be discarded and the 51st step will be placed at the top of the list.
From the Edit menu, select Preferences.
In the General tab, enter the number of steps in Maximum undo/redo.