Maxima 5.44.0 Manual: Garbage Collection

Next: Introduction to Program Flow, Previous: Lisp and Maxima, Up: Program Flow [Contents][Index]

### 37.2 Garbage Collection

One of the advantages of using lisp is that it uses “Garbage Collection”. In other words it automatically takes care of freeing memory occupied for example of intermediate results that were used during symbolic computation.

Garbage Collection avoids many errors frequently found in C programs (memory being freed too early, multiple times or not at all).

Function: garbage_collect ()

  Tries to manually trigger the lisp’s garbage collection. This rarely is necessary as the lisp will employ an excellent algorithm for determining when to start garbage collection.

  If maxima knows how to do manually trigger the garbage collection for the current lisp `garbage_collect` returns `true`, else `false`.

  ·

  Categories: Programming

Next: Introduction to Program Flow, Previous: Lisp and Maxima, Up: Program Flow [Contents][Index]