JDK-6559565 : Dynamic upper memory limit please
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2007-05-18
  • Updated: 2010-04-04
  • Resolved: 2008-05-12
Related Reports
Duplicate :  
Description
A DESCRIPTION OF THE REQUEST :
Java should have the option to automatically grow the heap without being governed by an arbitrary limit.

JUSTIFICATION :
Over the past 10 years of java development having a fixed upper memory limit has
been a pain many times over. It has been a pain on servers, fat clients and through jnlp. Just because it's not always wise to have an unbounded memory limit doesn't mean it should not be an option.

Other competing technologies do not seem to suffer these arbitrary limitations (need I name names?).

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
When using -Xmx:auto the JRE will use any available system memory for the heap.
ACTUAL -
java.lang.OutOfMemoryError

CUSTOMER SUBMITTED WORKAROUND :
Set -Xmx to the highest possible value on a particular machine. Not ideal, and can only be achived by trial and error.