2

I am getting the outofmemory error due to the heap is full. I tried to use visual VM heap allocated is 100gb and when it goes high my code just crashes. When I tried to use jmap heap command its showing me this

   2:       7507575     4337985632  [I
   3:      25378115     3958444680  [B
   4:      66190710     2721459632  [C
   5:      61202334     1958474688  java.lang.String
   6:      71581749     1717961976  java.lang.Long
   7:      27637190      905312736  [Z
   8:        217955      701768592  [Ljava.lang.Object;
   9:      26329556      631909344  java.text.ParsePosition
  10:      17176831      549658592  java.util.Date

What are this other [I and [B and [C objects and How can I find them?

I cannot take the heap dump.

Bryan
  • 14,756
  • 10
  • 70
  • 125
Yashdeep Hinge
  • 382
  • 2
  • 14
  • What code are you running that causes this? – nhouser9 Oct 04 '16 at 18:37
  • Those are arrays. I think they're int arrays. – Carcigenicate Oct 04 '16 at 18:38
  • I would look at how much memory is retained after a Full GC using this `live` opion of `jmap`. `ParsePosition` for example should have very few retained values. `[I` is an array of `int`, `[B` is an array of bytes, `[C` is `char[]` usualy inside String, `[Z` is `boolean[]` Note: this total about 10 GB not 100 GB. – Peter Lawrey Oct 04 '16 at 18:41

1 Answers1

1

[X are arrays; See http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.3 for details on data type of the array

ashburnite
  • 195
  • 1
  • 1
  • 9