JOL: Incorrect ClassLayout header/loss calculation for arrays

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • None
    • Affects Version/s: None
    • Component/s: tools
    • None
    • jol

      JOL misatributes array length as gap:

      > [B object internals:
      > OFF SZ TYPE DESCRIPTION VALUE
      > 0 8 (object header: mark) N/A
      > 8 4 (object header: class) N/A
      > 12 4 (array length) N/A
      > 12 4 (alignment/padding gap)
      > 16 0 byte [B.<elements> N/A
      > Instance size: 16 bytes
      > Space losses: 4 bytes internal + 0 bytes external = 4 bytes total

            Assignee:
            Aleksey Shipilev
            Reporter:
            Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: