I get the error "Target memory heap exceeded. Rebuild with .out file with more heap"

Look in the Codegen Dialog

Heap is dynamic memory that is allocated at boot time. VisSim puts buffer storage for interactive JTAG communication in the heap. Also, enabled and custom rate compounds can use heap if there are input and output pins. The maximum heap is set in the Tools > Code Gen... dialog under "Heap Size". If you receive the "Target memory heap exceeded" message, put a larger heap value in the compile dialog and recompile. There is a limited amount of RAM available for stack and heap and you may get a linker error if you exceed the physical RAM limits of the target. In this case, reduce the heap memory.