#### 93.1.11 Out of memory

Lisp typically handles several types of memory containing at least one stack and a heap that contains user objects. To avoid running out of memory several approaches might be useful:

- If possible, the best solution normally is to use an algorithm that is more memory-efficient.
- Compiling a function might drastically reduce the amount of memory it needs.
- Arrays of a fixed type might be more memory-efficient than lists.
- If maxima is run by sbcl sbcl’s memory limit might be set to a value that is too low to solve the current problem. In this case the command-line option `--dynamic-space-size <n>` allows to tell sbcl to reserve `n` megabytes for the heap. It is to note, though, that sbcl has to handle several distinct types of memory and therefore might be able to only reserve about half of the available physical memory. Also note that 32-bit processes might only be able to access 2GB of physical memory.

·

Categories: Error messages