The standard C library memory allocation functions (malloc
,
calloc
, realloc
, and free
) are available in
foreign code, but cannot reuse any free memory that SICStus Prolog's
memory manager may have available, and so may contribute to memory
fragmentation.
The following functions provide the same services via SICStus Prolog's memory manager.
SP_malloc()
SP_calloc()
SP_realloc()
SP_free()
SP_strdup()