Услуги Сертификаты Новости Статьи База знаний Алгоритмы Портфолио Скачать Ссылки Поиск
Услуги arrow База знаний arrow Microsoft Visual Studio arrow Visual Studio Out of Memory exceptions
Visual Studio Out of Memory exceptions Версия для печати Отправить на e-mail

As you probably know Visual Studio requires quite a bit of memory resources, especially if your solution is fairly large. Important to know is that the Visual Studio memory use is limited to 2GB of virtual memory. This is true even when you are running Visual Studio on a 64-bit OS because VS is still a 32-bit application.

When Visual Studio + all Add-Ins memory use gets close to the 2GB limit it throws the OutOfMemoryException which cannot be caught nor handled.

To address this issue to an extent you can make Visual Studio use up to 3GB of virtual memory.

First of all, tell the OS to increase the amount of user-mode memory from 2GB to 3GB. (If you are running on 64-bit, skip this step)

  • For Windows 7: Run the following from the command prompt:
    BCDEDIT /Set IncreaseUserVa 3072

Next step is to make Visual Studio aware of the larger address space:

  • Be sure to backup devenv.exe
  • From the command prompt navigate to "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE"  and execute the following: 
    editbin /LARGEADDRESSAWARE devenv.exe
  • Reboot your computer
Or you can create CMD file:

cd C:\Program Files\Microsoft Visual Studio 10.0
vc\bin\editbin.exe /LARGEADDRESSAWARE common7\IDE\devenv.exe 


SET PATH=%PATH%;C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ 

CD "C:\Program Files\Microsoft Visual Studio 10.0\VC\"

editbin /LARGEADDRESSAWARE "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" 

Solution was found here .

Последнее обновление ( 10.03.2014 )
< Пред.   След. >