I have installed Mono on an Ubuntu server and "Hello World" is working, but a simplified application that does some array handling and runs without problem under Mono on OSX or Windows is giving:
System.OutOfMemoryException: Out of memory.
at (wrapper alloc) object:AllocVector (intptr,intptr)
It should not require more than a few MB of memory. The server has 4GB of RAM.
Running again under alloc profile gives a different exception:
System.OverflowException: Number overflow.
at (wrapper managed-to-native) object:__icall_wrapper_mono_array_new_specific (intptr,int)
The problem is inconsistent, sometimes the code runs once but then not a second time. Sometimes it doesn't work for the first time. Sometimes it fails in a different method but for the same reason.
The program and full output can be downloaded at http://dev.intelorca.co.uk/2014/gacj_allocproblem.zip It would be good to see if anyone else has problems running the program under mono and can provide any insight on what the problem is. Any pointers to configuring Mono to run better on Ubuntu would also be helpful.
The program should output "Cambridge Surprise Major" 128 times.