I have an algorithm which currently allocates a very large array of doubles, which it updates and searches frequently. The size of the array is N^2/2, where N is the number of
Be aware that some operating systems have better support for memory mapping than others.
I would be tempted to do this:
You might find you have more control over performance that way - the -Xmx can be tweaked as desired.