#include <quintus/quintus.h>
     int QP_trimcore()

QP_trimcore() is the C equivalent of Prolog's trimcore/0.


trimcore/0 is usually called by Prolog when you return to top level after each query. But if you have an embedded application without Prolog's top level or a runtime system then you can call QP_trimcore() explicitly to ask Prolog to consolidate all its free memory and free as much as possible back to the operating system.

Like trimcore/0 it should be used judiciously, as overuse can result in unnecessary time being spent in memory expansion and contraction. However, it can be used when Prolog is to be dormant for a period, or as much free memory as possible is desired.

See Also

trimcore/0 fli-emb