T
The Sourcerer
Hi,
I am trying to allocate a byte array i na console app.
The process jumps over the 1 GB RAM and then throws
System.OutOfMemoryException.
It happens with diffrent sizes of allocation, on different computers,
using Framework 1.1.
Any ideas ?
Code:
static void Main(string[] args)
{
try
{
// Allocate Buffer in X Size ( Many X Discovered )
byte[] buffer = new byte[16776576];
// byte[] buffer = new byte[16776577]; // Another Example
// byte[] buffer = new byte[16776587]; // Another Example
// byte[] buffer = new byte[25161696]; // Another Example
// mote then 1 G of RAM is allocated here!
}
catch (Exception ex)
{
// Gives: System.OutOfMemoryException: Exception of type
System.OutOfMemoryException was thrown.
Console.WriteLine(ex.ToString());
Console.ReadLine();
}
}
}
I am trying to allocate a byte array i na console app.
The process jumps over the 1 GB RAM and then throws
System.OutOfMemoryException.
It happens with diffrent sizes of allocation, on different computers,
using Framework 1.1.
Any ideas ?
Code:
static void Main(string[] args)
{
try
{
// Allocate Buffer in X Size ( Many X Discovered )
byte[] buffer = new byte[16776576];
// byte[] buffer = new byte[16776577]; // Another Example
// byte[] buffer = new byte[16776587]; // Another Example
// byte[] buffer = new byte[25161696]; // Another Example
// mote then 1 G of RAM is allocated here!
}
catch (Exception ex)
{
// Gives: System.OutOfMemoryException: Exception of type
System.OutOfMemoryException was thrown.
Console.WriteLine(ex.ToString());
Console.ReadLine();
}
}
}