your brain has kind of a super focus mode that occurs right at the point of death. where everything flies into overdrive and usually totally out of control, so you remember everything.
if you can stay focused on one thing theres a good chance you could get out of most situations. but that isnt common.