История изменений
Исправление Deleted, (текущая версия) :
# Running 64-bit HotSpot VM.
# Using compressed oop with 0-bit shift.
# Using compressed klass with 3-bit shift.
# Objects are 8 bytes aligned.
# Field sizes by type: 4, 1, 1, 2, 2, 4, 4, 8, 8 [bytes]
# Array element sizes: 4, 1, 1, 2, 2, 4, 4, 8, 8 [bytes]
***** 32-bit VM: **********************************************************
java.util.HashMap$Node object internals:
OFFSET SIZE TYPE DESCRIPTION VALUE
0 8 (object header) N/A
8 4 int Node.hash N/A
12 4 Object Node.key N/A
16 4 Object Node.value N/A
20 4 Node Node.next N/A
Instance size: 24 bytes
Space losses: 0 bytes internal + 0 bytes external = 0 bytes total
***** 64-bit VM: **********************************************************
java.util.HashMap$Node object internals:
OFFSET SIZE TYPE DESCRIPTION VALUE
0 16 (object header) N/A
16 4 int Node.hash N/A
20 4 (alignment/padding gap) N/A
24 8 Object Node.key N/A
32 8 Object Node.value N/A
40 8 Node Node.next N/A
Instance size: 48 bytes
Space losses: 4 bytes internal + 0 bytes external = 4 bytes total
***** 64-bit VM, compressed references enabled: ***************************
java.util.HashMap$Node object internals:
OFFSET SIZE TYPE DESCRIPTION VALUE
0 12 (object header) N/A
12 4 int Node.hash N/A
16 4 Object Node.key N/A
20 4 Object Node.value N/A
24 4 Node Node.next N/A
28 4 (loss due to the next object alignment)
Instance size: 32 bytes
Space losses: 0 bytes internal + 4 bytes external = 4 bytes total
***** 64-bit VM, compressed references enabled, 16-byte align: ************
java.util.HashMap$Node object internals:
OFFSET SIZE TYPE DESCRIPTION VALUE
0 12 (object header) N/A
12 4 int Node.hash N/A
16 4 Object Node.key N/A
20 4 Object Node.value N/A
24 4 Node Node.next N/A
28 4 (loss due to the next object alignment)
Instance size: 32 bytes
Space losses: 0 bytes internal + 4 bytes external = 4 bytes total
Исходная версия Deleted, :
# Running 64-bit HotSpot VM.
# Using compressed oop with 0-bit shift.
# Using compressed klass with 3-bit shift.
# Objects are 8 bytes aligned.
# Field sizes by type: 4, 1, 1, 2, 2, 4, 4, 8, 8 [bytes]
# Array element sizes: 4, 1, 1, 2, 2, 4, 4, 8, 8 [bytes]
Instantiated the sample instance via java.util.HashMap$Node(int,java.lang.Object,java.lang.Object,java.util.HashMap$Node)
java.util.HashMap$Node object internals:
OFFSET SIZE TYPE DESCRIPTION VALUE
0 4 (object header) 01 00 00 00 (00000001 00000000 00000000 00000000) (1)
4 4 (object header) 00 00 00 00 (00000000 00000000 00000000 00000000) (0)
8 4 (object header) 59 38 00 20 (01011001 00111000 00000000 00100000) (536885337)
12 4 int Node.hash 0
16 4 Object Node.key null
20 4 Object Node.value null
24 4 Node Node.next null
28 4 (loss due to the next object alignment)
Instance size: 32 bytes
Space losses: 0 bytes internal + 4 bytes external = 4 bytes total