Out of memory exception in Hydra

Hi,

i try to allocate int array of 216000 ints and get “out of memory exception”. any idea?
Did someone see it?

i am using Hydra with 4.2 framework…

216000 * 8 (bytes per int) = ~1.648M; you may not have that much contiguous RAM available. Try using a LargeBuffer: http://wiki.tinyclr.com/index.php?title=Custom_Heap or make sure you’re not eating up your RAM elsewhere

Custom heap functions were removed from 4.2

LargeBuffer class still applies, the size of the custom heap is now static ally defined in the firmware any you can nolonger programmatically adjust the custom heap size.

4MB is the current set custom heap size.

LargeBuffer is still available.

@ andre.m - I am not at my PC so I can’t point to the exact location, but you should be able to see the size in the linker scatter file iirc.

I also recommend to force GC run before trying to allocate big chunk of memory.

CustomHeap is not affected by GC. You must properly dispose of it yourself according to the docs.

That was more of a general advise.