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!

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s