This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi Howard, > I'm writing a java application using NetCDF Java interface, and I get this > java.lang.OutofMemoryError. The size of array is little over 6 million, and > it's a floating point array. Is there remedy for this? Thank you very much. You could specify a higher value for the maximum size of the JVM memory allocation pool, via the -Xmx option to the java command. The default is 16 Mbytes, and 6 million floats would require at least 24 Mbytes. Alternatively, if you don't need all 6 million floats in memory at the same time, you could exploit netCDF's direct access capabilities to just access the subset of data you need when you need it. Finally, if you suspect some kind of unnecessary object retention, you might also want to look at the freely-available Java Heap Analysis Tool 1.03 (HAT) available from http://developer.javasoft.com/developer/earlyAccess/hat/index.html to analyze the -Xhprof files that are generated by JDK 1.2. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu