Can you freeze a C/C++ process and continue it on a different host?

前端 未结 9 1291
栀梦
栀梦 2021-02-14 02:11

I was wondering if it is possible to generate a \"core\" file, copy if to another machine and then continue execution of the a core file on that machine?

I have seen the

9条回答
  •  独厮守ぢ
    2021-02-14 03:00

    In some cases, this can be done. For example, part of the Emacs build process is to load up all the Lisp libraries and then dump the memory image on disk for quick loading. Some other language interpreters do that too (I'm thinking of Lisp and Scheme implementations, mostly). However, they're specially designed for that kind of use, so I don't know what special things they have to do to allow that to work.

    I think this would be very hard to do for a random program, but if you wrote a framework where all objects supported serialisation/deserialisation, you can then serialise all objects used by your program, and then ship that elsewhere, and deserialise them at the other end.

    The other people's answers about virtualisation are on the spot, too.

提交回复
热议问题