Java 对象大小

2018/10/03 Java

java对象内存layout

  • Class : A pointer to the class information, which describes the object type. In the case of a java.lang.Integer object, for example, this is a pointer to the java.lang.Integer class.
  • Flags : A collection of flags that describe the state of the object, including the hash code for the object if it has one, and the shape of the object (that is, whether or not the object is an array).
  • Lock : The synchronization information for the object — that is, whether the object is currently synchronized.

Java Process Memory

32 Java Integer Object Memory

Java Array

Java String

参考

Search

    Table of Contents