Node:3.10 New Features, Next:3.10 Bugs Fixed, Up:3.10 Changes
The fix involves a partial redesign of the memory allocator. The API
function SP_set_memalloc_hooks()
has changed
incompatibly. See Initializing the Prolog Engine.
As a consequence of the changes to the memory allocator, the
sicstus
option -m
and the spld
option
--memhook
are no longer meaningful. They are ignored for
compatibility but will be removed in some future release.
As another consequence of the changes, the "aligned pointer" concept and all such requirements in the foreign language interface have been dropped.
Under Windows and Linux the memory for the Prolog stacks are now pre-allocated when initializing the SICStus run-time. This makes it less likely that the memory allocations of other parts of the application, such as Java, will conflict with the allocation needs of SICStus.
This pre-allocation affects applications that use more than one SICStus
run-time in the same process, e.g. from Java. The first initialized
SICStus run-time will typically reserve all memory usable for Prolog
stacks. This means that subsequent SICStus run-times initialized in the
same process will fail. Set the environment variable
PROLOGMAXSIZE
to a suitable value to work around this
problem. See Environment Variables.
As part of the memory manager re-design, the SICStus API functions
SP_malloc()
, SP_calloc()
, SP_realloc()
now take
size_t
size arguments instead of unsigned int
, just as
their standard C equivalents.
spld
option --more-memory
. This option modifies the linker
script on x86 Linux so that almost 256MB can be used by the Prolog
stacks. It is ignored on other platform. This option should be
considered experimental.
spld
takes new options:
--resources-from-sav
--no-resources-from-sav
.sav
file. Thus you do not need to know what foreign resources are used by
the loaded Prolog code. This is now the default for static executables
when no other resources are specified apart from an embedded saved-state. To turn off this feature, use --no-resources-from-sav
.
-E
--extended-rt
SP_LIBRARY_DIR
is set during SICStus
initialization to the location of the SICStus library files. This is
similar to SP_APP_DIR
and SP_RT_DIR
. See Environment Variables.
Term
has a new method
toString(Term options)
. The implementing class SPTerm
calls
write_term/3
.
library(timeout)
now measures the user
mode time of the SICStus thread. Under Windows 95/98/ME, the time is still
walltime.
statistics(runtime, ...)
now measures the
user time of the SICStus thread. This is the same as process user time
for a single-threaded program but makes statistics(runtime, ...)
meaningful also in a program with several threads (such as when using
Java or multiple SICStus runtimes).
library(bdb)
: now requires Berkeley DB 4.1.24
instead of 4.0.14. The predicate db_sync/1
is new.
library(clpfd)
:
assignment/2
and global_cardinality/2
take
new options, associating with the constraint a cost, which is reflected
into a domain variable.
lex_chain/[1,2]
expresses the fact that several
vectors of domain variables are in ascending lexicographic order.
fd_global/3
has been extended with new options.