[Mono-bugs] [Bug 73843][Wis] New - OutOfMemoryException on machine with 4 Gb RAM
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Fri, 18 Mar 2005 10:17:33 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by yury@serdyuk.botik.ru.
http://bugzilla.ximian.com/show_bug.cgi?id=73843
--- shadow/73843 2005-03-18 10:17:33.000000000 -0500
+++ shadow/73843.tmp.14804 2005-03-18 10:17:33.000000000 -0500
@@ -0,0 +1,99 @@
+Bug#: 73843
+Product: Mono: Class Libraries
+Version: 1.0
+OS: SLES 8
+OS Details: Linux server 2.4.25bigmem #7 SMP Wed Dec 15 10:05:05 EET 2004 i686 i686 i386 GNU/Linux
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: Yury@serdyuk.botik.ru
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: OutOfMemoryException on machine with 4 Gb RAM
+
+Description of Problem:
+
+OutOfMemoryException during array allocation
+of size ~ 1 Gb on machine with 4 Gb RAM
+
+Steps to reproduce the problem:
+
+Test program :
+
+using System;
+public class Test1GbMemory {
+ public static void Main ( String[] args ) {
+ int N = System.Convert.ToInt32 ( args [ 0 ] );
+ double[,,] array = new double [ N, N, N ];
+ Console.WriteLine ( "Array size = " + ( N * N * N * 8 ) + "\n" +
+ "Allocated bytes = " + GC.GetTotalMemory (false) );
+ return;
+ }
+}
+
+1. mcs Test1GbMemory.cs
+2. mono Test1GbMemory.exe
+
+Actual Results:
+
+[serdyuk@itk-104 StreamRLI]$ mono Test1GbMemory.exe 400
+Array size = 512000000
+Allocated bytes = 512098304
+[serdyuk@itk-104 StreamRLI]$ mono Test1GbMemory.exe 500
+
+Unhandled Exception: System.OutOfMemoryException: Out of memory
+in (unmanaged) 0x8080be0
+in <0x00004> (wrapper managed-to-native)
+System.Object:__icall_wrapper_ves_array_new_va_3 (intptr,intptr,intptr,intptr)
+in <0x00037> Test1GbMemory:Main (string[])
+
+Expected Results:
+
+Normal termination in the second case
+
+How often does this happen?
+
+Always.
+
+Additional Information:
+
+Mono version :
+
+[serdyuk@itk-104 StreamRLI]$ mono -V
+Mono JIT compiler version 1.1.4, (C) 2002-2004 Novell, Inc and
+Contributors. www.go-mono.com
+ TLS: __thread
+ GC: Included Boehm (with typed GC)
+ SIGSEGV : normal
+ Globalization: none
+
+System information :
+[serdyuk@itk-104 StreamRLI]$ uname -a
+Linux server 2.4.25bigmem #7 SMP Wed Dec 15 10:05:05 EET 2004 i686 i686
+i386 GNU/Linux
+
+Memory info :
+
+ total: used: free: shared: buffers: cached:
+Mem: 4234272768 2322898944 1911373824 0 128507904 1867874304
+Swap: 2097434624 0 2097434624
+MemTotal: 4135032 kB
+MemFree: 1866576 kB
+MemShared: 0 kB
+Buffers: 125496 kB
+Cached: 1824096 kB
+SwapCached: 0 kB
+Active: 506704 kB
+Inactive: 1471372 kB
+HighTotal: 3276224 kB
+HighFree: 1613452 kB
+LowTotal: 858808 kB
+LowFree: 253124 kB
+SwapTotal: 2048276 kB
+SwapFree: 2048276 kB
+meminfo (END)