Fatal Error C1002
compiler is out of heap space in pass 2
The compiler ran out of dynamic memory space during its second pass, probably due to a program with too many symbols or complex expressions.
To fix by using the following possible solutions
Divide the source file into several smaller files.
Break expressions into smaller subexpressions.
Remove other programs or drivers that consume memory.