The Visual Studio devenv.exe process is 32-bit (even when run on a 64-bit OS), so it can't use more than 4GB of virtual memory.
Unfortunately, when I am debugging my C++ application with Visual Studio I frequently run out of memory due to this 4GB limit. For example, using VMMap, below shows progression of my typical Visual Studio usage over a few hours leading to a crash.
How can I get Visual Studio to use less memory so I stop wasting time with it crashing?
Is it typical for Visual Studio to use more than 3.5 GB virtual address space?
I am using Visual Studio 2012, but I assume this problem spans different VS versions, since Visual Studio 2015 still doesn't have a 64-bit version.
(Note that VMMap reports “Free” as the remaining memory in the address space, up to 4GB for 32 bit processes, and 8TB for 64 bit processes on Windows.)
Things I've already tried:
- starting in safe mode
- removing all plugins and extensions so that nothing shows in Tools > Add-in Manager nor Tools > Extensions (https://github.com/tsasioglu/Total-Uninstaller is helpful for this)
- deleting my .suo/.sdf files
- deleting my AppData/*/Microsoft/VisualStudio folders
- using Funnel and filtering out all but 3 projects
- removed all my "Symbol file (.pdb) locations" selections and chose "Automatically load symbols for: " "Only specified modules"
- selected "Enable Just My Code" for debugging
- disabling Intellisense (Tools -> Options -> Text Editor -> C/C++ -> Advanced -> Disable IntelliSense)