From: Somerset, U.K.
ORIGINAL: Local Yokel
Floyd, looks like there's no shortage of physical memory on my machine. Will see what I can do get more memory allocated. Many thanks!
<edit> Cool! Increased heap size to 64MB - not only has this cured the air unit history display problem, it's also cured the problem with the air production total not showing. Just gets better and better! </edit>
How do you do that?
I googled something like 'java virtual machine heap' and came up with a number of likely hits. The one I worked from was here on devX.com. The relevant tip says this:
"If your Java program requires a large amount of memory, it's possible that the virtual machine will begin to throw OutOfMemoryError instances when attempting to instantiate objects. In some cases, this may be the result of a programming error, but in others, it's simply a result of your program legitimately using more memory than is available. In this latter case, you can increase the "heap size" allocated by the Java Virtual Machine (JVM) by using command line options. When not specified, the heap size defaults to 1 MB, and can increase to as much as 16 MB if your program requires more memory. To set the initial amount of memory allocated for your program, use the -ms option with a 1.1 JVM, and the -Xms option with a 1.2 (also known as Java 2) JVM. To set the maximum amount of memory that can be allocated for your program, use the -mx or -Xmx for Java 1.1 or 1.2, respectively. For example:
java -ms32m -mx128m MyClassName (Java 1.1)
java -Xms32m -Xmx128m MyClassName (Java 1.2 / 2.0)
In each case, the options specify that 32 MB of memory should be allocated initially for the program to run in, and that up to 128 MB may be allocated if necessary.
You should note the presence of the "X" on the Java 1.2 / 2.0 options. It indicates that these are non-standard options that might not function the same way or could even be removed in future JVMs. In the meantime, you may find it necessary to take advantage of these options if your program requires a large amount of memory."
So I set a minimum 64MB heap size for the Tracker VM by changing the syntax of my WitPTracker.bat file so that it reads:
java -Xms64m -jar "WitPTracker.jar"
I've put the bit that sets a 64MB heap size in bold text. Not sure whether that may be over the top, but didn't cause a problem on my machine. I could also have set a maximum heap size using the '-Xmx' notation, but see no reason to do so unless/until its absence causes me a problem.