Attached the .lpi file (zipped) with the compiler settings. Almost all settings are off. I exclusively use Lazarus. Any setting to change? Speed of final application is important.
Well that does not tell me too much that would help.
Does your application use a lot of recursion or local procedures? (you mention speed..) That can trick the compiler in recursive optimizations and would explain why the compiler itself runs out of resources trying to optimize those..
Especially if the code itself is not well written.
Set some hard limitations in recursive routines and local procedures and try again.
If you have simple code to reproduce it, please give us the code.
I can trigger the compiler into this behavior, but only with deliberately flawed code: either with recursive allocation or with recursive local routines.
For noobs: simplified explanation: yes in the application code, w/o executing, but during compilation the compiler builds a tree. When this tree is exhausted, compilation fails for lack of resources. This can be caused by even simple optimizations that are applied on endless recursion. Usually that is the programmers mistake and not the compiler.