This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

lnk6x.exe failed to allocate memory

We have started getting this error message intermittently:

INTERNAL ERROR: C:/Program Files/Texas Instruments/C6000 Code Generation Tools 7.3.9/bin/lnk6x.exe failed to allocate memory
This is a serious problem.  Please contact Customer
Support with this message and a copy of the input file
and help us to continue to make the tools more robust.

I have seen some previous posts involving this error message but this does not appear to be the same problem. This is a very large project, exe size around 30 MB in a debug build (20 MB release). We have only seen the error in debug builds and it comes and goes depending on which file(s) we link with debug symbols but there is no apparent pattern we can discern, as if it is a pseudo-random or chaotic bug in the linker. It's being linked on a system with 8GB of physical RAM (16 GB virtual) so it is not actually running out of memory unless it's hitting the limit of a 32-bit process. It seems there have been a number of allocation-failure bugs in previous versions of the linker but I'm not finding any known ones in 7.3.9. Please help.

  • We need to reproduce this problem ourselves before we can say much about it.  I realize that is difficult for linker issues, but there is really no other way forward.

    As a total shot in the dark that is unlikely to work ... See if this wiki article is any help.

    Thanks and regards,

    -George

  • Thanks George, the wiki article was a useful clue. I monitored the linker process memory usage and when it linked sucessfully it peaked at 3.5 GB of RAM so it was close to the 4 GB limit for a 32-bit process, and I expect that minor changes to our code could change the allocation pattern to push it over the limit. We do have several large projects getting linked with debug symbols, but 3.5 GB seems excessive and I suspect it may be a memory leak in the linker as has been reported before. At any rate we don't normally need to link all of these projects with debug symbols at the same time so I tried switching them to release mode and the peak linker memory dropped to 0.5 GB. It's not the most satisfying resolution but unless the problem resurfaces we're not going to pursue it any further. Thanks again for your advice.