Thus spake jrwatts:
One very good reason to switch to a new programming language in the
future; with Java, you have to tell it the maximum memory it can use at
startup, and then there’s no way for the system to later say “hey, can
you give me some of that 8GB back; I really need it for this other
program?” without closing the Java program completely.
What programming language lets other programs reclaim memory from a
different running program, or provides any facility for letting other
programs request that? I know of none.
The issue I see with Java here is that the user can’t possibly know
in advance how much memory will be needed.
The problem you’re facing is an entirely different one: 8GB is far,
far too large for your max heap. Try 512MB, followed by 768MB and 1024MB
if that’s not enough. There are hardly any modules which benefit from
more than that.
–
J.