Availability:built-in
[det]trim_heaphis predicate attempts to return heap memory to the operating system.
There is no portable way of doing so. If the system detects tcmalloc it
calls MallocExtension_ReleaseFreeMemory(). If the system detects
ptmalloc as provided by the GNU runtime library it calls malloc_trim().
In other cases this predicate simply succeeds. See also trim_stacks/0
- Introduced in 8.3.27 (👉583ccb4) trim_heap/0 and a Prolog flag `malloc` to identify the malloc implementation and provide additional features when detected.