For some reason I'm getting a System.OutOfMemoryException
when I try to declare a new array of float of size 100000000. It's supposed to take up 381MB and my PC has 8GB (2.5 of which are taken up by Windows and other apps).
float[] kineticTile = new float[dimsize]; //<- exception thrown here (dimsize is 100000000)
Declaring same kind of array in other parts of my application works fine.
Other posts on SO have explanations of the problem but I still cannot see an actual solution to it.
I do image rendering and processing and need the whole image in memory (I copy it from a CUDA card) so cannot cut it into smaller fragments. I thought with 8GB of RAM these mere 380MB should not be a problem