Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8005895

Inefficient InstanceKlass field packing wasts memory

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b16

      Backports

        Description

        I noticed we are not very efficient on packing the fields in current instanceKlass.hpp. The 'bool' typed variables, '_is_marked_dependent' and '_has_default_methods' are grouped with u2 typed fields. For both, there are 1byte padding added on 32bit machine. We can pack those two boolean variables together to avoid the padding, then move one of the u2 field to be together with '_init_state' and '_reference_type'. That will save 1byte for free without any real code change.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                jiangli Jiangli Zhou
                Reporter:
                jiangli Jiangli Zhou
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: