Junk food linked to memory loss: study