4.43.2 Heap memory (malloc)
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Memory Management
          • Heap memory (malloc)
            • trim_heap/0
            • TCMalloc control predicates
    • Packages
Availability:built-in
[det]trim_heap
his 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