That is not a helpful error. Obviously somethign about that attempt uses more memory than the others, but the error message does not give us much clue about what that is.
If you want to try to debug this further, you would probably need to do something like run this query https://docs.moodle.org/dev/Overview_of_the_Moodle_question_engine#Detailed_data_about_an_attempt for the attempt in question.
Or, you could try telling us which version of Moodle you are using, and which question types are used in that quiz.