The fix involves a partial redesign of the memory allocator. The API
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_realloc() now take
size_t size arguments instead of
unsigned int, just as
their standard C equivalents.
Termhas a new method
toString(Term options). The implementing class
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
global_cardinality/2take 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/3has been extended with new options.