12.2.7 Memory Management

SP_calloc()
Allocates memory for an array of elements, and clears the allocated memory.
SP_foreign_stash() [macro]
provide a memory location unique to the current foreign resource instance
SP_free()
Deallocates a piece of memory.
SP_malloc()
Allocates a piece of memory.
SP_mutex_lock()
Locks a mutex.
SP_mutex_unlock()
Unlocks a mutex.
SP_realloc()
Changes the size of an allocated piece of memory.
SP_register_atom()
prevents an atom from being discarded by atom garbage collection even if not referenced by Prolog code
SP_set_memalloc_hooks() [preinit]
provide the memory management bottom layer
SP_strdup()
Makes a copy of a string in allocated memory.
SP_unregister_atom()
enables an atom to be discarded during atom garbage collection if not referenced by Prolog code

Send feedback on this subject.