What are these objects in the jmap histogram?

17,603
  • [C is a char[]
  • [S is a short[]
  • [I is a int[]
  • [B is a byte[]
  • [[I is a int[][]

The JavaDoc for Class.getName() has the details.

Share:
17,603
Chris Steinbach
Author by

Chris Steinbach

Nothing to see here. Move along.

Updated on June 03, 2022

Comments

  • Chris Steinbach
    Chris Steinbach about 2 years

    I'm using jmap to get a histogram of the heap. I'm not sure what the objects are that are referred to as "[C", "[S", "[I" and "[B". Anyone know?

    $ jmap -histo 3299
    
     num     #instances         #bytes  class name
    ----------------------------------------------
       1:          9804       19070632  [Ljava.util.HashMap$Entry;
       2:         38074        6216960  [Ljava.lang.Object;
       3:         62256        4727832  [C
       4:         19665        3124744  <constMethodKlass>
       5:         19665        2365864  <methodKlass>
       6:         57843        2313720  java.lang.String
       7:          1662        2060528  <constantPoolKlass>
       8:         21121        1842344  [S
       9:         37772        1743888  <symbolKlass>
      10:          2554        1655632  [I
      11:         63710        1529040  java.lang.Integer
      12:          1662        1264184  <instanceKlassKlass>
      13:          1515        1196224  <constantPoolCacheKlass>
      14:         24351        1168848  java.util.HashMap$Entry
      15:         18706        1047536  java.net.SocketTimeoutException
      16:          4301         784416  [B
     ...
      23:          2588         242616  [[I