This 2014 fruit fly study found:
“A biologically relevant event such as finding food under starvation conditions or being poisoned can drive long-term memory in a single training session.”
I don’t think that we need to discover at these extremes, though, whether or not the finding has human applicability.
We do know from the Dutch hunger winter of 1944 study referenced in the Non-PC alert: Treating the mother’s obesity symptoms positively affects the post-surgery offspring study that prenatal exposure to famine had lifelong ill effects on the children. The exposed children had epigenetic DNA changes – a form of long-term memory – from their mothers’ starvation, which resulted in relative obesity compared with their unexposed siblings.
http://www.pnas.org/content/112/2/578.full “Distinct dopamine neurons mediate reward signals for short- and long-term memories”