Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4473053

The JRE switch '-Xmx' should NOT be necessary

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 1.3.0
    • Fix Version/s: None
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_2000

      Description



      Name: krC82822 Date: 06/21/2001


      21 Jun 2001, eval1127@eng -- see also # 4122060 and:
      http://search.java.sun.com/Search/java?qt=%2Bruntime+%2B%22-Xmx%22+%2Brequired&col=obug&rf=0
      --------------
      C:\users\dcook>java -version
      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

      For cmd-line client pgms written in Java, the need for
      the use of the '-Xmx' switch should be eliminated! Users
      who will launch such programs should NOT have to guess what the
      heap requirements of the program will be.

      Here's a reproducer:

      public class VMexpansion
      {
       
          public VMexpansion()
          {
          }
       
          public static void usage()
          {
              System.err.println("Usage: <integerFactor>");
              System.err.println("[Hint: Prepend JRE switch like '-Xmx80m' if
      OutOfMemoryErrors occur.]");
              System.err.println("[Hint: try specifying a cmd-line factor of 80]");
              System.err.println("[Hint: then, try specifying a cmd-line factor of 90
      and use -Xmx80m]");
              System.err.println("[Hint: See...the V1.3 JVM's behavior is brain-
      dead! Users should NOT have to know about -Xmx switch.]");
              System.exit(-1);
          }
       
          public static void main(String[] argv)
          {
              VMexpansion VMexpansion1 = new VMexpansion();
       
              if (argv.length < 1)
                  usage();
              int factor = Integer.parseInt(argv[0]);
              int million = 1000000;
       
              byte[] heap = new byte[factor * million];
          }
      }
      (Review ID: 127113)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                foliversunw Fred Oliver (Inactive)
                Reporter:
                kryansunw Kevin Ryan (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: