[Armedbear-devel] How to get a fresh session or instance
evenson at panix.com
Wed Dec 10 10:51:21 UTC 2014
> On Dec 9, 2014, at 23:06, Robert Dodier <robert.dodier at gmail.com> wrote:
> Hi, is there a way to get a fresh session or instance of ABCL, short
> of reloading all the classes? Ideally I'd like to be able to have
> two or more instances which exist at the same time and are independent
> of each other.
The Lisp environment is a global singleton per JVM process, like that of any
other Lisp implementation is per OS process. So, to get a fresh instance, one
would need to start multiple JVMs, just like one would have to start multiple
instances of, say, SBCL to get a “fresh session”. Since starting JVMs can be
expensive time-wise, the Java ecology has developed numerous “drop-in” tools to
pre-initialize JVMs, of which the best known may be [drip].
> I believe the answer to this question is "no", but I just want to make
> sure I am not overlooking something. If indeed it's not possible now,
> what would it take to make it happen? I see there is a certain amount
> of static data -- would it be necessary to replace that with
> (just for the sake of discussion) a hash table which takes a session
> or instance id as a key?
> Any thoughts on this topic will be appreciated.
To carry forward the comparison with SBCL: what would it take to make SBCL
have a “fresh instance”? Maybe you don’t really want a “fresh instance” in
ABCL down to its initial state but some equivalent of save-image-and-die
restoration? Unfortunately, I know of no mechanism in the Oracle-derived JVMs
that allow one to use mmap()-like facilities to load in a previously dumped JVM
instance. I think that there once were commercial, non-free JVM
implementations available that would do this sort of thing (Terracotta?), but I
can’t find any mention of one in a quick web search.
Could you be more specific about your use case?
"A screaming comes across the sky. It has happened before but there is nothing
to compare to it now."
Armedbear-devel mailing list
Armedbear-devel at common-lisp.net
More information about the armedbear-devel