C Run-Time Error R6009

not enough space for environment

There was enough memory to load the program but not enough memory to create the envp array.

One of the following may be a solution:

  • Increase the amount of memory available to the program.

  • Reduce the number and size of command-line arguments.

  • Reduce the environment size by removing unnecessary variables.

If your program uses the compact, large, or huge memory model, this error may be avoided by using LINK's /CPARM:1 command-line option. This option causes unused near heap space to be allocated to the far heap.