ObjectLayoutInspector
ObjectLayoutInspector copied to clipboard
PrintLayout seems wrong layout of ComplexFixedStruct
As in my pull #19, seems ComplexFixedStruct
inside VeryVeryComplexStruct has bad layout by TypeLayout
.
Standard Output Messages:
Type layout for 'VeryVeryComplexStruct'
Size: 136 bytes. Paddings: 36 bytes (%26 of empty space)
|=====================================================|
| 0-11: StructWithExplicitLayout one (12 bytes) |
| |================================| |
| | 0: Byte m_byte1 (1 byte) | |
| |--------------------------------| |
| | 0: Byte m_byte1_1 (1 byte) | |
| |--------------------------------| |
| | 1: Byte m_byte2 (1 byte) | |
| |--------------------------------| |
| | 2-3: Int16 m_short (2 bytes) | |
| |--------------------------------| |
| | 4-5: padding (2 bytes) | |
| |--------------------------------| |
| | 6-9: Int32 m_int (4 bytes) | |
| |--------------------------------| |
| | 10-11: padding (2 bytes) | |
| |================================| |
|-----------------------------------------------------|
| 12-15: padding (4 bytes) |
|-----------------------------------------------------|
| 16-39: DoubleByteStructByteStruct two (24 bytes) |
| |========================================| |
| | 0-15: DoubleByteStruct one (16 bytes) | |
| | |=============================| | |
| | | 0-7: Double one (8 bytes) | | |
| | |-----------------------------| | |
| | | 8: Byte two (1 byte) | | |
| | |-----------------------------| | |
| | | 9-15: padding (7 bytes) | | |
| | |=============================| | |
| |----------------------------------------| |
| | 16: Byte two (1 byte) | |
| |----------------------------------------| |
| | 17-23: padding (7 bytes) | |
| |========================================| |
|-----------------------------------------------------|
| 40-99: ComplexFixedStruct three (60 bytes) |
| |=================================================| |
| | 0-25: <_bytes>e__FixedBuffer _bytes (26 bytes) | |
| | |==========================================| | |
| | | 0-1: Int16 FixedElementField (2 bytes) | | |
| | |------------------------------------------| | |
| | | 2-25: padding (24 bytes) | | |
| | |==========================================| | |
| |-------------------------------------------------| |
| | 26-58: FixedBytes fb (33 bytes) | |
| |-------------------------------------------------| |
| | 59: Boolean three (1 byte) | |
| |=================================================| |
|-----------------------------------------------------|
| 100-103: padding (4 bytes) |
|-----------------------------------------------------|
| 104-127: ComplexStruct four (24 bytes) |
| |=========================================| |
| | 0-15: DoubleFloatStruct one (16 bytes) | |
| | |=============================| | |
| | | 0-7: Double one (8 bytes) | | |
| | |-----------------------------| | |
| | | 8-11: Single two (4 bytes) | | |
| | |-----------------------------| | |
| | | 12-15: padding (4 bytes) | | |
| | |=============================| | |
| |-----------------------------------------| |
| | 16-23: EnumIntStruct two (8 bytes) | |
| | |==============================| | |
| | | 0: ByteEnum one (1 byte) | | |
| | |------------------------------| | |
| | | 1-3: padding (3 bytes) | | |
| | |------------------------------| | |
| | | 4-7: Int32 two (4 bytes) | | |
| | |==============================| | |
| |=========================================| |
|-----------------------------------------------------|
| 128-132: Nullable`1 theNullable (5 bytes) |
|-----------------------------------------------------|
| 133-135: padding (3 bytes) |
|=====================================================|