Memory function of sharp wave ripples