
For more information, see Troubleshooting System.OutOfMemoryExceptions in ASP.NET. It's also possible to see an OOM condition because of a combination of 1 and 2. The virtual address space is fragmented, reducing the likelihood that a large, contiguous allocation will succeed.Your process is using much memory (typically over 800 MB in a 32-bit environment.).There are two reasons why you might see an OOM condition. It is possible to experience an OOM in a 32-bit process running on a 64-bit operation system, but it usually doesn't occur until the process is using close to 3 GB of private bytes. If the operating system is unable to satisfy the GC's request for a contiguous block of memory, a System.OutOfMemoryException (OOM) occurs.Ī 32-bit process running on a 64-bit operation system can address 4GB of user-mode memory, and a 64-bit process running on a 64-bit operation system can address 8TB of user-mode memory, so an OOM on a 64-bit operation system isn't likely. These large allocations must be satisfied from contiguous blocks of the 2 GB of address space that the process has to work with. When it needs a new segment for the large object heap, it makes an allocation of 16 MB. When the GC needs a new segment for the small object heap (where objects smaller than 85 KB reside), it makes an allocation of 64 MB. NET Framework's garbage collector (GC) does when it needs memory to grow the managed heaps. When an application needs to use memory, it reserves a chunk of the virtual address space and then commits memory from that chunk. It all assumes that you aren't running with the /3gb switch enabled. The 2 GB allocated for Kernel-mode memory is shared among all processes, but each process gets its own 2 GB of user-mode address space. Out of that, 2 GB is reserved for the operating system (Kernel-mode memory) and 2 GB is allocated to user-mode processes. A 32-bit operating system can address 4 GB of virtual address space, whatever the amount of physical memory that is installed in the box. Contrary to what many developers believe, the amount of RAM that's installed doesn't impact the possibility of an OutOfMemoryException. So we've put together a collection of resources to help troubleshooting and identifying the cause of memory issues.īefore we cover the details of troubleshooting an OutOfMemoryException, it's important to understand what causes this problem. One of the most common issues that we see in Microsoft Customer Support Services is OutOfMemoryException scenarios.

Original product version: ASP.NET Original KB number: 2020006 Symptoms This article helps you troubleshoot Out of Memory errors in ASP.NET.
