can't allocate custom amount of ram to java when starting process from C#
It's possible that your c# application is 32-bit, in which case it would
be launching Java as a 32-bit process, which would limit the amount of RAM
that Java could address. If this is the case, try recompiling your c#
application as x64.