Changeset 230


Ignore:
Timestamp:
Jan 8, 2011, 11:09:12 PM (15 years ago)
Author:
dmik
Message:

README.OS2: Wording.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/README.OS2

    r229 r230  
    9191
    9292  Note that these values are gathered on a default eCS 2.0 GA system and may
    93   vary depending on what system DLLs get loaded into each process, they are
     93  vary depending on what system DLLs get loaded into each process; they are
    9494  given only as an example. You may get the real values on your system with
    9595  a variety of tools gathering system information, such as THESEUS.
    9696
    9797  On the other hand, when calculating the default amount of memory to reserve
    98   for the the heap (which is called the maximum heap size in the documentation),
     98  for the heap (which is called the maximum heap size in the documentation),
    9999  Java uses the physical RAM size as a base, not the the size of the free block
    100100  in the private arena (where Java actually allocates the heap). Below is a
    101101  simplified version of the algorithm for these calculations:
    102102
    103   1. Use MIN (MaxRAM, <physical_RAM>) as the base RAM value. MaxRAM is a Java[
    104      constant that defaults to 1G for the client (regular) Java virtual machine
    105      and 4G for the server JVM.
     103  1. Use MIN (MaxRAM, <physical_RAM>) as the base RAM value. MaxRAM is a Java
     104     constant that defaults to 1G for the client (default) Java virtual machine
     105     and to 4G for the server JVM.
    106106
    107107  2. Divide this base RAM value by MaxRAMFraction (4 by default) and assign the
     
    109109
    110110  3. Use the MaxHeapSize value increased by 20-30% (for the needs other than the
    111      Java heap) as the size of the private memory block to allocate.
     111     Java heap) as the size of the memory block to allocate in the private
     112     arena.
    112113
    113114  So, if your machine has, say, 2G of RAM and you attempt to start it in server
     
    121122  limiting the amount of memory Java wants for the heap to the actual size of
    122123  the available memory block in the private arena. So, in the above case Java
    123   would actually get about 310M in server mode (instead of the requested 512M).
    124   You may change this limit by changing VIRTUALADDRESSLIMIT in CONFIG.SYS
    125   (according to the table above), but please note that values higher than 1024
    126   may cause problems with some drivers (for example, it is known that JFS and
    127   HPFS386 drivers cannot allocate a disk cache of the big size if the
    128   VIRTUALADDRESSLIMIT value is too high).
     124  would actually get about 310M in server mode (instead of performing a failed
     125  attempt to allocate 512M). You may change this limit by changing the
     126  VIRTUALADDRESSLIMIT value in CONFIG.SYS (according to the table above), but
     127  please note that values higher than 1024 may cause problems with some drivers
     128  (for example, it is known that JFS and HPFS386 drivers cannot allocate a disk
     129  cache of the big size if the VIRTUALADDRESSLIMIT value is too high).
    129130
    130131  In either case, the above describes how Java calculates the defaulut maximum
     
    132133  command line option if you are not satisfied with the default value for some
    133134  reason or if your applcation gives you the "Could not reserve enough space for
    134   object heap" message at startup. However, keep in mind that if you a -Xmx
    135   value which is bigger than the maximum free block in the private arena, you
    136   will get the same error and will have to decrease the requested size until it
    137   succeeds.
     135  object heap" message at startup. However, keep in mind that if you specify a
     136  -Xmx value which is, increased by 20-30% as described in step 3 above, bigger
     137  than the maximum free block in the private arena, you will get the same memory
     138  allocation error which indicates that you should use a smaller value.
    138139
    139140
Note: See TracChangeset for help on using the changeset viewer.