Decomposition for the flow of the heat equation with memory