trimcore/0
trimcore
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 attempts to return any unused memory to the operating system. It is called automatically at every top-level query, except the stacks are not trimmed then.