Why do I get a Java 'out of memory' error from rtiddsgen when using a large data type?

Note: Applies to RTI Connext 4.x and above.

If your IDL file defines a large data type and rtiddsgen reports an "out of memory" error, increasing the Java heap memory may help. To do this, open $NDDSHOME/scripts/rtiddsgen with an editor of your choice and add -X options (see below) to the last line.

For example:

  • On Linux systems:
    exec "${JREHOME}/bin/java" -Xms256M -Xmx512M -DNDDS_RESOURCE_DIR="${nddsgenDir}/resource" -DNDDSHOME="$NDDSHOME" -jar "${nddsgenDir}/class/rtiddsgen.jar" "$@"
  • On Windows systems:
    "%JREHOME%\bin\java" -Xms256M -Xmx512M -DNDDS_RESOURCE_DIR="%nddsgenDir%\resource" -DNDDSHOME="%NDDSHOME%" -jar "%nddsgenDir%/class/rtiddsgen.jar" %args%

    where -Xms256M means "set initial Java heap size to 256MB" and -Xmx512M means "set maximum Java heap size to 512MB."

Platform:
Programming Language:
Keywords: