11.3.230 trimcore/0



Force reclamation of memory in all of Prolog's data areas.


Trims the stacks, reclaims any dead clauses and predicates, defragmentizes Prolog's free memory, and endeavors to return any unused memory to the operating system.

The environment variable PROLOGKEEPSIZE can be used to define a lower bound on the amount of memory to be retained. Also, the environment variable PROLOGINITSIZE can be used to request than an initial amount of memory be allocated. This initially allocated memory will not be touched by trimcore/0.

When trimming a given stacks, trimcore/0 will retain at least the amount of space initially allocated for that stack.

trimcore/0 is called each time Prolog returns to the top level or the top of a break level, except it does not trim the stacks then.

See Also

ref-mgc-ove-rsp, too-sicstus.

Send feedback on this subject.