12.8.2 Memory Allocation
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Foreign Language Interface
        • Notes on Using Foreign Code
          • Memory Allocation
            • PL_malloc()
            • PL_realloc()
            • PL_free()
    • Packages
Availability:C-language interface function
void * PL_malloc(size_t bytes)
Allocate bytes of memory. On failure SWI-Prolog's fatal-error handler is called and PL_malloc() does not return. Memory allocated using these functions must use PL_realloc() and PL_free() rather than realloc() and free().