Save a process' memory for later use?

前端 未结 8 1711
温柔的废话
温柔的废话 2020-12-14 00:28

Is it possible to pause a process, save the memory contents to a file, and then later reload the file so you can continue the program?

Edit I\'ve be

8条回答
  •  情书的邮戳
    2020-12-14 01:17

    Quote from "Persist (hibernate!) a process state to disk for quiker loading" (sic):

    Q. Can you please explain more on how this swap works so that process state will be saved in disk and reuse when required?"

    A. It's very simple. The Page file is a special place on a disk where inactive processes are stored in highly optimized way. When such process resumes running, the system automagically reads it back to memory and it just continues from where it was. It is sort of how programs run on iPad :)

    All this functionality is already built into Windows. While your process keeps running, the system ensures that it is either in the memory or in the page file (there are few exceptons though, which you can ignore).

    In other words, Windows already has the ability to hibernate a process to the page file. @MSalters quote from Raymond Chen "explaining why its impossible" is simply wrong.

提交回复
热议问题