When building an application with spld, by default only one SICStus run-time can be loaded in the process. This is similar to the case in SICStus versions prior to 3.9. For most applications built with spld, the changes necessary to support multiple SICStus run-times should be invisible, and old code should only need to be rebuilt with spld.
In order to maintain backward compatibility, the global dispatch vector
is automatically set up by SP_initialize()
. Other SICStus API
functions will not set up the dispatch vector, and will therefore lead
to memory access errors if called before
SP_initialize()
. Currently, hook functions such as
SP_set_memalloc_hooks()
also set up the dispatch vector to allow
them to be called before SP_initialize()
. However, only
SP_initialize()
is guaranteed to set up the dispatch vector. The
hook installation functions may change to use a different
mechanism in the future. The SICStus API functions that perform
automatic setup of the dispatch vector are marked with
SPEXPFLAG_PREINIT
in sicstus.h.