[Mono-list] Too many heap sections

Yury Serdyuk Yury at serdyuk.botik.ru
Wed Dec 15 02:17:16 EST 2010


Hi !

Now the problem is the following -
I can't allocate a hashtable with 220 mln elements due to "Out of 
memory" exception

The result is the same for machines with 32 and 48 Gb of memory.

Indeed, a hash with 200 mln elements occupies ~ 15 Gb of memory:

> $ mono HashTest.exe 200000000
> N = 200000000
> Hash size = 200000000
> Total Memory = 14971244544
> mono HashTest.exe 220000000
> N = 220000000
>
> Unhandled Exception: System.OutOfMemoryException: Out of memory
>   at (wrapper managed-to-native) 
> object:__icall_wrapper_mono_array_new_specific (intptr,int)
>   at System.Collections.Hashtable..ctor (Int32 capacity, Single 
> loadFactor, IHashCodeProvider hcp, IComparer comparer) [0x00000] in 
> <filename unknown>:0
>   at System.Collections.Hashtable..ctor (Int32 capacity, Single 
> loadFactor) [0x00000] in <filename unknown>:0
>   at System.Collections.Hashtable..ctor (Int32 capacity) [0x00000] in 
> <filename unknown>:0
>   at HashTest.Main (System.String[] args) [0x00000] in <filename 
> unknown>:0

Any suggestions and comments , please ...

Regards,
               Yury



More information about the Mono-list mailing list