我从哪里可以得到有关.NET对象模型在内存布局信息的信息? [英] Where could I get the information about the in-memory layout info of .NET Object Model?

查看:141
本文介绍了我从哪里可以得到有关.NET对象模型在内存布局信息的信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道.NET的内存重新presentation构造如接口的,的,结构的,等等。有一个很好的书对C ++对象模型 - <的 内C ++对象模型 >斯坦利。李普曼,我希望有一个类似的书,.NET和C#。

I want to know the in-memory representation of .NET constructs such as "interface", "class", "struct", etc. There's an excellent book for C++ object model - <Inside the C++ Object Model> by Stanley. Lippman, I want a similar book for .NET and C#.

我看了一下.NET一些书,但他们大多是有关的逻辑的使用.NET的。他们没有在谈论的物理的内存布局信息。我认为这是有必要知道至少有一个.NET实现的。

I have read some books about .NET, but they are mostly about the logical usage of .NET. None of them talks about the physical in-memory layout info. I think it's necessary to know at least one implementation of .NET.

我已经读到了钻入.NET框架内部机制,以请参阅如何在CLR创建运行时对象可能有人提供了有关更深入的书籍和文章的一些提示?

I have read about the "Drill Into .NET Framework Internals to See How the CLR Creates Runtime Objects" Could someone provide some hints about more in-depth books and articles?

如果这个信息是不公开avaialble。共享源代码一个像单声道或共享源代码CLI可能是一种选择。

If this info is not publicly avaialble. Shared source one like Mono or Shared Source CLI could be an option.

非常感谢。

推荐答案

原因此信息是不容易得到几乎可以肯定是故意的代表微软。

The reason this information is not easily available is almost certainly deliberate on Microsofts behalf.

微软创建了.NET Framework和CLR,所以你不必(过分)担心自己在哪里/如何你的对象存储在内存中(implmentation详情)。这种无知,实际上是使用.NET的最大好处之一;你并不需要担心的问题,如手动内存分配,处理器/内存模型等。

Microsoft created the .NET Framework and the CLR so you do not have to (unduly) worry yourself about where/how your objects are stored in memory (implmentation details). This "ignorance" is actually one of the biggest benefits of using .NET; you do not need to worry about issues such as manual memory allocation, processor/memory models etc.

这样做的另一个好处是,它提高了安全性,即它使得编写恶意code更加艰难,但不是不可能的,当然。

The other benefit of this is that it improves security, ie it makes writing malicious code that much harder, although not impossible of course.

CLR通过C#通过杰夫里氏下,可能是目前最好的书油烟机式的.NET信息。第4章,5,20和21很可能是最有关.NET类型的布局热点,尽管如上所述,你不会找到详细的C ++对象模型的相同水平。

CLR Via C# by Jeff Richter is probably the best current book for "under the hood" type .NET information. Chapters 4, 5, 20 and 21 would probably be of most interest regarding layout of .NET types, although, as explained above, you will not find the same level of detail as the C++ object model.

这篇关于我从哪里可以得到有关.NET对象模型在内存布局信息的信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆