Diffusion processes and memory effects