1

Say I have a complex application that does various things, e.g. brings up a window, loads some assets, processes a virtual world, goes into OpenGL, etc.

Can I hibernate it, i.e. save its current memory state and resume it later at will in a safe manner?

If to be safe it would have to restrict the user from some functionality 'till it's resumed it's fine.

j riv
  • 3,593
  • 6
  • 39
  • 54
  • I didn't get what I was looking for actually but I understood the problem. e.g. If I need an OpenGL context, I can't just bring it up from mere memory, I'd need to recreate it, etc. – j riv Nov 14 '10 at 04:33

3 Answers3

0

See How to "hibernate" a process in Linux by storing its memory to disk and restoring it later? for linux-specific version of your question (and answers!)

Community
  • 1
  • 1
caveman
  • 1,755
  • 1
  • 14
  • 19
0

This really depends on what hibernation is for you. If this should be a feature across a reboot of your machine and your program is sufficiently complex look into a virtual machine as a container of your program. Then use the hibernation feature of the guest operating system.

If this is not what you want and you don't care about saving the state across boots, just stop your program. In linux e.g you could then evacuate all the memory your program needs to swap. (I guess this should be possible on other OS', too)

Jens Gustedt
  • 76,821
  • 6
  • 102
  • 177
0

If you can save/resume games, why not business applications? You just have to make a process to write the app state to disc... then load that state from disc - Making sure that nothing is different between before and after.

How complicated that is really depends on a lot of things - remote connections, db states, multi-user environments, etc...

WernerCD
  • 2,137
  • 6
  • 31
  • 51