Here you can set the number of undoable steps. A maximum of 500 is allowed.
On editing large images a single undo step may consume many megabytes of memory and only a few undo steps may be sufficient to exceed the capacity of modern computers. Therefore, you can enter an additional limit which defines the maximum amount of memory used for undo of a document.