[Mono-devel-list] Issue to allocate more than 1Gb of memory with mono
Zoltan Varga
vargaz at gmail.com
Sat Mar 19 10:20:14 EST 2005
Hi,
This is now tracked as:
http://bugzilla.ximian.com/show_bug.cgi?id=73882
Zoltan
On Thu, 17 Mar 2005 16:55:35 +0100 (MET), Joannes Vermorel
<vermorel at clipper.ens.fr> wrote:
> I am running mono on a bi-AMD64 machine with 8Gb of memory under linux
> redhat (64bit OS). I do not succeed in allocating more than 1Gb of memory
> with mono (see my little program here below).
>
> Can someone help me about this issue. I have several tasks that requires
> to handle more than 1Gb of memory.
>
> Thanks,
> Joannès
>
> ----------------------------------------
> $ mono --version
> Mono JIT compiler version 1.1.3, (C) 2002-2004 Novell, Inc and
> Contributors. www.go-mono.com
> TLS: __thread
> GC: Included Boehm (with typed GC)
> SIGSEGV : normal
> Globalization: none
>
> ----------------------------------------
> $ mono MemoryChecker.exe
> Pointer size(in bytes): 8
> Max Mb block allocated: 1039
> System.OutOfMemoryException: Out of memory in <0x67f4d03b> (wrapper
> managed-to-native) System.Object:__icall_wrapper_mono_array_new_specific
> (intptr,int) in <0x0000f> (wrapper managed-to-native)
> System.Object:__icall_wrapper_mono_array_new_specific (intptr,int) in
> <0x000c3> MemoryChecker.MemoryChecker:Main (string[])
>
> ----------------------------------------
> class MemoryChecker
> {
> public const int MB = 1000000;
>
> [STAThread]
> static void Main(string[] args)
> {
> Console.WriteLine("Pointer size(in bytes): {0}",
> IntPtr.Size);
>
> byte[][] bigArray = new byte[10000][];
>
> int index = 0;
> while(true)
> {
> try
> {
> bigArray[index++] = new byte[MB];
> }
> catch(Exception e)
> {
> Console.WriteLine("Max Mb block allocated:
> {0}", index);
> Console.WriteLine(e);
> break;
> }
>
> }
> }
> }
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
More information about the Mono-devel-list
mailing list