Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
379 views
in Technique[技术] by (71.8m points)

Visual Studio 2017 out of memory during linking

While running a C++ build in Visual Studio, sometimes the build and link operations appear inside visual studio in the task manager. When this happens, once the total memory of Visual Studio hits ~3.5GB, building fails with a link error out of memory. At the the time of failure, the linker is at only ~2GB. If I get lucky and the linker appears outside of the main VisualStudio process in the task manager, the linker is able to get above 2GB while VisualStudio remains very low at around 300MB.

I tried adding the PATH (How does the Visual Studio 32-bit linker find the 64-bit linker?) for 64bit but it doesn't seem to actually run in 64bit. Why do compiler/linker sub-processes sometimes run outside of visual studio? Does this even matter?

Example of the task manager display with the linker/compiler showing as a subprocess of VS.

Firefox
Task Manager
Microsoft Visual Studio 2017 (32bit)
  |-> Microsoft Incremental Linker (32bit)
  |-> MSBuild.exe (32bit)
  |-> MSBuild.exe (32bit)
  |-> ...

Example of the task manager display with the linker/compiler showing NOT as a subprocess of VS.

Firefox
Task Manager
Microsoft Incremental Linker (32bit)
MSBuild.exe (32bit)
MSBuild.exe (32bit)
Microsoft Visual Studio 2017 (32bit)
question from:https://stackoverflow.com/questions/65887449/visual-studio-2017-out-of-memory-during-linking

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...