0 Replies Latest reply: Jun 22, 2009 12:22 PM by 843829 RSS

    OutOfMemoryError - heap size does NOT expand

    843829
      When the JVM crashes, it dumps the following:

      ...
      Heap
      PSYoungGen total 164224K, used 164223K [0xa2e80000, 0xad7f0000, 0xb1200000)
      eden space 158272K, 100% used [0xa2e80000,0xac910000,0xac910000)
      from space 5952K, 99% used [0xacb00000,0xad0cffb8,0xad0d0000)
      to space 7296K, 33% used [0xad0d0000,0xad33bde0,0xad7f0000)
      PSOldGen total 747904K, used 472772K [0x31200000, 0x5ec60000, 0xa2e80000)
      object space 747904K, 63% used [0x31200000,0x4dfb1100,0x5ec60000)
      PSPermGen total 131072K, used 58251K [0x29200000, 0x31200000, 0x31200000)
      object space 131072K, 44% used [0x29200000,0x2cae2d98,0x31200000)
      ...

      It seems like there is no more available memory on the heap (eden section).
      According to this dump, the total heap memory is 164,224 + 747,904 + 131,072 = 1,043,200 (PSYoungGen + PSOldGen + PSPermGen) which is around 1 GB.
      However, the JVM startup options are: -XX:PermSize=128m -XX:MaxPermSize=128m -XX:-HeapDumpOnOutOfMemoryError -Xms512m -Xmx2048m
      So I would say that there should be at least one more gigabyte of memory available (the machine has plenty).

      As far as I can understand, the heap should have expanded due to the increase in memory and since it is configured to have a maximum of around 2GB, it should NOT have any problem because it currently uses around 1 gigabyte. Is there anything I'm missing? Is there an implicit maximum heap size that I don't know of?

      Edited by: jumg on Jun 22, 2009 10:21 AM