How to solve “Not enough memory” error and Windows Phone 8 Emulator does not start in Windows 8.1

If you are a Windows Phone developer and have upgraded your system from windows 8 to windows 8.1 then you might have faced “Not enough memory” error problem. If you are facing same problem then stop worrying, Microsoft exposed the symptom, reasons and solution of “Not enough memory” error message and Windows Phone 8 Emulator does not start in Windows 8.1
Here is the link – http://support.microsoft.com/kb/2911380

Reason –

If you are a windows 8.1 user and your system having less than 8 GB ram and moreover you are simultaneously running many programs with developing apps for windows phone, then it is quite obvious that Windows Phone 8 emulator won’t start and will throw a message as given below :

The Windows Phone Emulator wasn’t able to ensure the virtual machine was running: Something happened while starting a virtual machine: ‘Emulator Name’ could not initialize. (Virtual machine ID GUID) Not enough memory in the system to start the virtual machine Emulator Name with ram size 1024 megabytes. (Virtual machine ID GUID)”

rrk-wpmemoryerror

Ok fine, but a question can stuck in your mind that,
How same program used to run in windows 8 platform but it fails on windows 8.1 ?
Microsoft stated that this problem occurs in Windows 8.1 because the operating system is more conservative than the Windows 8 version about how it allocates memory to maintain consistently high performance. In Windows 8.1, Hyper-V memory management accounts for the memory that is consumed by programs before it starts any emulator instances. Hyper-V did not make this consideration in Windows 8.

Solution –

If the emulator still does not start, you can disable the Hyper-V runtime memory monitoring functionality by adding a MemoryReserve registry.

To do this, follow these steps:

Step 1) Start Registry Editor.
Step 2) Locate the following registry subkey: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization
Step 3) Right-click the Virtualization folder, point to New, and then click DWORD Value.
Step 4) Type MemoryReserve, and then press Enter.
Step 5) Double-click MemoryReserve,
Step 6) Under Value data field, type 2048
Step 7) Select Decimal option and click OK
Step 8) Close Registry Editor
Step 9) Restart your system.

Note : Before you modify anything in registry file, make sure that you made the back up the registry for restoration in case any problems occur.

Advertisements

About Ravi Ranjan Kumar

An Indian who Living, Loving & Learning Technology with different tastes and willing to share knowledge and thoughts.
This entry was posted in CodeProject, Tips&Tricks, Windows 8, Windows Phone and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s