tigger
YaBB Newbies
Offline

I Love Mono!
Posts: 1
|
Hi,
I am running into an odd problem on a 64bit Itanium system. I compiled mono from tarball (v1.9.1) and ran into some memory problems which I pinned down with a test program. When I try to create an array that is bigger than 4gb in size, e.g. a large double[,], I get an out of memory exception although the system has far more memory. I tested if I am actually running in 64bit by checking the pointer size in the program and it is 8 bytes.
Any help is welcome, thanks.
Cheers, Christian
p.s. The test program:
static void Main(string[] args) { Console.WriteLine("SizeOf IntPtr is: {0}", IntPtr.Size);
int iRows = 35750; int iCols = 15000; long bytes = 0;
try { while (iRows < 37000) { bytes = (long)iRows * (long)iCols * (long)sizeof(double); double[,] Dbl = new double[iRows, iCols]; Dbl[0, 0] = 0; Console.WriteLine(Convert.ToString(bytes / (1024 * 1024)) + "MB allocated or double[" + iRows + "," + iCols + "]"); iRows += 250; GC.Collect(2); } } catch (OutOfMemoryException e) { Console.WriteLine("Unable to allocate: " + Convert.ToString(bytes / (1024 * 1024)) + "MB or double[" + iRows + "," + iCols + "]"); Console.WriteLine(e.Message); }
|