ObjectLayoutInspector icon indicating copy to clipboard operation
ObjectLayoutInspector copied to clipboard

A tool that helps to see an internal structure of the CLR types at runtime

Results 16 ObjectLayoutInspector issues
Sort by recently updated
recently updated
newest added

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...

```csharp [TestFixture] public class NullableTests { [Test] public void NullableLongByteStruct() { TypeLayout.PrintLayout(); var typeLayout = TypeLayout.GetLayout(includePaddings: true); var size = Unsafe.SizeOf(); Assert.AreEqual(typeLayout.Size, 123); } } ``` ```csharp Standard Output Messages:...

TypeLayout for `Components` should be able to return `4` fields, not `2`. ``` public struct Components { public DoubleFloatComponent a; public EnumIntComponent b; } public struct DoubleFloatComponent { public double...

Linked list is recursive struct which is well know. It should be in main doc page and/or in tests. You may take any of https://github.com/OpenSharp/ObjectLayoutInspector/blob/master/src/ObjectLayoutInspector/ObjectLayoutInspector.Tests/UnsafeLinkedListTests.cs.

I did next https://github.com/OpenSharp/ObjectLayoutInspector/blob/master/src/ObjectLayoutInspector/ObjectLayoutInspector.Tests/UnsafeLinkedListTests.cs which gives ``` Type layout for 'cell`1' Size: 8 bytes. Paddings: 0 bytes (%0 of empty space) |================================| | 0-3: Int32 element (4 bytes) | |--------------------------------|...

In the following printed layout, Size seems off by 16B because it does not include Object Header and Method Table Ptr: ``` Size: 40. Paddings: 11 (%27 of empty space)