c++ - How to Get Visual Studio To Stay Within 4GB Virtual Address Space -
the visual studio devenv.exe process 32-bit (even when run on 64-bit os), can't use more 4gb of virtual memory.
unfortunately, when debugging c++ application visual studio run out of memory due 4gb limit. example, using vmmap, below shows progression of typical visual studio usage on few hours leading crash.
how can visual studio use less memory stop wasting time crashing?
is typical visual studio use more 3.5 gb virtual address space?
i using visual studio 2012, assume problem spans different vs versions, since visual studio 2015 still doesn't have 64-bit version.
(note vmmap reports “free” remaining memory in address space, 4gb 32 bit processes, , 8tb 64 bit processes on windows.)
things i've tried:
- starting in safe mode
- removing plugins , extensions nothing shows in tools > add-in manager nor tools > extensions (https://github.com/tsasioglu/total-uninstaller helpful this)
- deleting .suo/.sdf files
- deleting appdata/*/microsoft/visualstudio folders
- using funnel , filtering out 3 projects
- removed "symbol file (.pdb) locations" selections , chose "automatically load symbols for: " "only specified modules"
- selected "enable code" debugging
- disabling intellisense (tools -> options -> text editor -> c/c++ -> advanced -> disable intellisense)
it possible reliably visual studio stay within it's 4gb of virtual memory, might have experiment 1 or more of following strategies while measuring devenv.exe memory usage vmmap:
- remove plugins , extensions tools > add-in manager , tools > extensions (https://github.com/tsasioglu/total-uninstaller might helpful) and/or run in safe mode
- periodically (e.g. monthly) delete .sdf , .suo files (while visual studio closed) can recreated (instead of deleting, consider renaming in case decide want them back, may loose configuration settings)
- if loading lot of symbols (you can count "symbols loaded" in vs output window), can disable this tools > options > debugging > symbols: "only specified modules", click "specify modules" , uncheck "always load symbols located next modules". can load additional symbols while debugging debug > windows > modules.
- unload projects large solutions funnel or solution folders
- if else fails, run 2 different visual studio instances: first has large solution loaded not used debug (e.g. debug > start without debugging), , second has no solution loaded attached running process debugging. (thanks chriso suggestion.)
- if can't visual studio work, try windbg used microsoft developers , 64-bit (unlike visual studio).
i have observed disabling symbol loading reducing devenv memory usage 1.7 gb , deleting .suo , .sdf file reducing memory usage additional 600 mb. reduction in memory usage made visual studio go crashing multiple times day running stable same instance running multiple days, weeks.
in addition reducing memory usage, these strategies significantly speed visual studio.
Comments
Post a Comment