JDK-6315074 : Allow for an unbounded maximum heap size
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 5.0,6
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux,windows_xp
  • CPU: x86
  • Submitted: 2005-08-24
  • Updated: 2011-04-04
  • Resolved: 2011-04-04
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Description
A DESCRIPTION OF THE REQUEST :
Allow Java the ability to expand the heap as much as necessary, instead of being limited by an artificial maximum value.

JUSTIFICATION :
Currently the user/developer must set the maximum heap size prior to an application's launch.  However, knowing how much memory an application will require beforehand is not always an easy, or even possible, task.  In cases where the memory requirements are dependent on user input or data files, neither the user nor the developer can accurately guess the memory necessary for an application to run.

An easy fix would be to set an option to disable the initial resource check and force the VM to check the system's current available memory (including virtual) before allocating more.  Currently the VM will refuse to start if the maximum heap size is too large, so the developer cannot specify a large enough value without knowing anything about the user's system requirements.  Removing this limitation would allow the user to set an unrealistically large heap size without needing to worry about the user's system.