[Mono-list] OutOfMemoryException
Yury Serdyuk
Yury@serdyuk.botik.ru
Fri, 18 Mar 2005 15:29:38 +0300
This is a multi-part message in MIME format.
--------------000209080300000406020905
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Hi !
I've encountered problem trying allocate array of > 1 Gb size on
machine with 4 Gb RAM :
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)
[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
[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[])
[serdyuk@itk-104 StreamRLI]$
[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
[serdyuk@itk-104 StreamRLI]$
> 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;
>
> }
>
> }
Is it a bug or
there are some special tools to work on big memory ?
Thanks.
Yury.
--------------000209080300000406020905
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi !<br>
<br>
I've encountered problem trying allocate array of > 1 Gb size on
machine with 4 Gb RAM :<br>
<br>
<small> total: used: free: shared: buffers: cached:<br>
Mem: 4234272768 2322898944 1911373824 0 128507904 1867874304<br>
Swap: 2097434624 0 2097434624<br>
MemTotal: 4135032 kB<br>
MemFree: 1866576 kB<br>
MemShared: 0 kB<br>
Buffers: 125496 kB<br>
Cached: 1824096 kB<br>
SwapCached: 0 kB<br>
Active: 506704 kB<br>
Inactive: 1471372 kB<br>
HighTotal: 3276224 kB<br>
HighFree: 1613452 kB<br>
LowTotal: 858808 kB<br>
LowFree: 253124 kB<br>
SwapTotal: 2048276 kB<br>
SwapFree: 2048276 kB<br>
meminfo (END)</small><br>
<br>
[<small>serdyuk@itk-104 StreamRLI]$ uname -a<br>
Linux server 2.4.25bigmem #7 SMP Wed Dec 15 10:05:05 EET 2004 i686 i686
i386 GNU/Linux<br>
<br>
[serdyuk@itk-104 StreamRLI]$ mono Test1GbMemory.exe 400<br>
Array size = 512000000<br>
Allocated bytes = 512098304<br>
[serdyuk@itk-104 StreamRLI]$ mono Test1GbMemory.exe 500<br>
<br>
Unhandled Exception: System.OutOfMemoryException: Out of memory<br>
in (unmanaged) 0x8080be0<br>
in <0x00004> (wrapper managed-to-native)
System.Object:__icall_wrapper_ves_array_new_va_3
(intptr,intptr,intptr,intptr)<br>
in <0x00037> Test1GbMemory:Main (string[])<br>
<br>
[serdyuk@itk-104 StreamRLI]$<br>
<br>
[serdyuk@itk-104 StreamRLI]$ mono -V<br>
Mono JIT compiler version 1.1.4, (C) 2002-2004 Novell, Inc and
Contributors. <a class="moz-txt-link-abbreviated" href="http://www.go-mono.com">www.go-mono.com</a><br>
TLS: __thread<br>
GC: Included Boehm (with typed GC)<br>
SIGSEGV : normal<br>
Globalization: none<br>
[serdyuk@itk-104 StreamRLI]$</small><br>
<br>
<blockquote type="cite"><small>using System;<br>
<br>
public class Test1GbMemory {<br>
<br>
public static void Main ( String[] args ) {<br>
<br>
int N = System.Convert.ToInt32 ( args [ 0 ] );<br>
<br>
double[,,] array = new double [ N, N, N ];<br>
<br>
Console.WriteLine ( "Array size = " + ( N * N * N * 8 ) + "\n" +<br>
"Allocated bytes = " + GC.GetTotalMemory ( false
) );<br>
return;<br>
<br>
}<br>
<br>
}</small></blockquote>
Is it a bug or<br>
there are some special tools to work on big memory ?<br>
<br>
Thanks.<br>
<br>
Yury. <br>
</body>
</html>
--------------000209080300000406020905--