Memory Layout of .NET Arrays (x64)

In my previous blog, I described how an arry looks in managed heap. Johnston asked a fair question as to how the same array will be represented in an x64 architecture. The real difference is only between the size of pointer. The size of an integer remains the same in both x86 and x64 architecture.

So if you see the output of !CLRStack command, you will see the pointer size is double the size from x86 output.

You will see same behaviour when you look at the output of dd command. However, if compare the size of the array contents that remain the same what we saw in case of x86 architecture.

Finally the same observation for !DumpMT command.

Until next, happy debugging!

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a comment