I guess the undo buffer needs multiple times as much RAM as the picture itself. As the picture alone needs more than 40MB, you probably just don't have enough memory for the undo buffer.
Also the memory shown in the title bar is the sum of all free memory chunks. It says nothing about the largest free block. Use the Avail command in a shell window to see the size of the largest continuous memory block.
Bye,
Thomas