Last active
April 9, 2016 12:13
-
-
Save xuwei-k/060822c7b88baabb5855 to your computer and use it in GitHub Desktop.
jol sample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ screpl org.openjdk.jol%jol-core%0.2 | |
[info] Loading global plugins from /Users/user/.sbt/0.13/plugins | |
[info] Set current project to ivy-console (in build file:/Users/user/.sbt/boot/ivy-console/) | |
Welcome to Scala version 2.11.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_25). | |
Type in expressions to have them evaluated. | |
Type :help for more information. | |
scala> println(org.openjdk.jol.info.ClassLayout.parseClass(classOf[Vector[Int]]).toPrintable) | |
scala.collection.immutable.Vector object internals: | |
OFFSET SIZE TYPE DESCRIPTION VALUE | |
0 12 (object header) N/A | |
12 4 int Vector.startIndex N/A | |
16 4 int Vector.endIndex N/A | |
20 4 int Vector.focus N/A | |
24 4 int Vector.depth N/A | |
28 1 boolean Vector.dirty N/A | |
29 3 (alignment/padding gap) N/A | |
32 4 Object[] Vector.display0 N/A | |
36 4 Object[] Vector.display1 N/A | |
40 4 Object[] Vector.display2 N/A | |
44 4 Object[] Vector.display3 N/A | |
48 4 Object[] Vector.display4 N/A | |
52 4 Object[] Vector.display5 N/A | |
Instance size: 56 bytes (estimated, the sample instance is not available) | |
Space losses: 3 bytes internal + 0 bytes external = 3 bytes total |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
screpl?