ARM Technical Support Knowledge Articles

"JVM terminated" error when launching DS-5 / OutOfMemoryError reported when using DS-5

Applies to: DS-5

Answer


Information in this knowledgebase article applies to:


SYMPTOMS

DS-5 Debugger and Eclipse IDE fail to start, reporting the error "JVM terminated". In some instances, the error message reported states "Java was started but exited with return code=1"

DS-5 Debugger and Eclipse IDE report OutOfMemory error, sometimes with message "GC overhead limit exceeded"

CAUSE

These problems are often caused by a lack of memory to run the application. DS-5 Debugger, Streamline and Eclipse IDE are implemented using JavaTM technology and the virtual machine needs to reserve a large contiguous area of virtual address space for the heap. In its current implementation, the virtual machine requires the heap size to be capped with a fixed maximum value. On starting up, the virtual machine reserves the total maximum amount of memory with the operating system, including the maximum heap; even though much less memory is actually allocated initially.

Two different issues can arise from inadequate heap sizing:

Assuming the virtual machine starts correctly, you can inspect the current and maximum heap usage as follows:

Note DS-5 requires a minimum specification of computer with a dual core 2GHz processor (or equivalent) and 2GB of RAM. 4GB or more of RAM is recommended to improve performance when debugging large images, or when using the simulation models.

RESOLUTION

Over DS-5 releases, different strategies have been implemented to allow the virtual machine to start on most machines and yet maximise the heap size to enable processing of large data sets, such as debug symbols. Please refer to the following table to find out which settings apply to your version of DS-5 and how to adjust them. Note you can see the version of DS-5 you are running either from the release notes or from within the Eclipse IDE, in the Help -> About ARM DS-5 dialog.

In all cases, the resolution consists in adjusting the maximum heap size to a value that matches the capabilities of your host machine. Finding the right value may take several iterations, and the result will differ from one machine to another. In the table below, <MAX_HEAP_SIZE> corresponds to this maximum heap size value, in MB (megabyte). The theoretical maxima for a 32-bit JVM are around 1300 MB on Windows and 3600 MB on Linux. To find the optimal value for your machine, you can start with the theoretical maximum for your platform and decrement the value until the virtual machine starts correctly, and reliably over time. <DS-5> corresponds to your installation directory.

Note that the files may be installed as read-only files. You might have to change the access permissions before you can edit them.

Version Platform Files Settings Resolution
5.12 and later Windows <DS-5>\sw\debugger\debugger.ini
<DS-5>\sw\eclipse\eclipse.ini
No specific option is used to set the maximum heap size Add -Xmx<MAX_HEAP_SIZE>m on its own line, underneath -vmargs
Linux <DS-5>/sw/debugger/debugger.sh
<DS-5>/sw/eclipse/eclipse.ini
5.8 to 5.11 Windows <DS-5>\sw\debugger\debugger.bat
<DS-5>\sw\eclipse\eclipse.ini
No specific option is used to set the maximum heap size Add -Xmx<MAX_HEAP_SIZE>m on its own line, underneath -vmargs
Linux <DS-5>/sw/debugger/debugger.sh
<DS-5>/sw/eclipse/eclipse.ini
5.7 Windows <DS-5>\sw\debugger\debugger.bat
<DS-5>\sw\eclipse\eclipse.ini
Option -XX:+AggressiveHeap is used to set the maximum heap size Replace -XX:+AggressiveHeap with -Xmx<MAX_HEAP_SIZE>m
Linux <DS-5>/sw/debugger/debugger.sh
<DS-5>/sw/eclipse/ds5eclipse
Script <DS-5>/sw/java/bin/setjvmheap32 is used to work out the maximum heap size Replace occurences of ${MAX_HEAP_SIZE} with <MAX_HEAP_SIZE>
5.6 Windows <DS-5>\sw\debugger\debugger.bat
<DS-5>\sw\eclipse\eclipse.ini
Option -XX:+AggressiveHeap is used to set the maximum heap size Replace -XX:+AggressiveHeap with -Xmx<MAX_HEAP_SIZE>m
Linux <DS-5>/sw/debugger/debugger.sh
<DS-5>/sw/eclipse/eclipse.ini
5.5 and earlier Windows <DS-5>\sw\debugger\debugger.bat
<DS-5>\sw\eclipse\eclipse.ini
Option -XX:DefaultMaxRAMFraction=1 is used to set the maximum heap size, capped at 1 GB Replace -XX:DefaultMaxRAMFraction=1 with -Xmx<MAX_HEAP_SIZE>m
Linux <DS-5>/sw/debugger/debugger.sh
<DS-5>/sw/eclipse/eclipse.ini

Article last edited on: 2014-03-11 15:10:40

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential