I am wondering why I\'m not able to allocate more that 1,000 MB of memory in my 32-bit .NET process. The following mini application throws an OutOfMemoryException after havi
I am truly sorry if I didn't get your point but:
static void Main(string[] args)
{
ArrayList list = new ArrayList();
int i = 0;
while (true)
{
using(byte newBt = new byte[1024 * 1024 * 10])
{
list.Add(newBt); // 10 MB
i += 10;
Console.WriteLine(i);
}
}
}
Have you tried the using method? And this might be a stupid question but why did you create an eternal loop? O if you try the code strip the symbols >.> xD.
Source: http://msdn.microsoft.com/en-us/library/yh598w02(v=vs.80).aspx