← Back to context

Comment by Alifatisk

5 months ago

Is there a way to snapshot the VM's warmed up state? So the next time when I run the application, it can jump into the warmed up state and continue from there?

This can be done. The virtual machine could dump its complete memory image into an ELF file. That way, resuming consists of simply executing the file. Emacs has done this for a while via the unexec function:

https://lwn.net/Articles/673724/

The big problem is (of course) global state in C libraries, especially libc.

Technically yes, this is common in JVM implementations, Android, .NET, and oldies like Smalltalk and Common Lisp.

So it could be possible to implement something similar for Ruby.