什么样的数据都存储在“类型对象的指针”和“同步块指数”? [英] What kind of data is stored in 'Type Object pointer' and 'Sync Block Index'?
问题描述
在CLR中,每个实例有两个附加字段来存储一些数据来管理对象:
In CLR, each instance have 2 additional fields to store some data to manage object:
- 类型的对象指针
- 同步块索引
你能解释基本上是什么?他们店内并简要它们是如何被使用的CLR?
Can you explain basically what do they store inside and briefly how are they used by CLR?
谢谢!
推荐答案
该类型对象的指针是一个指向对象的类型描述。这用于找出对象的实际类型是,例如需要做的虚拟通话。
The type object pointer is a pointer to a type description of the object. This is used to find out what the actual type of an object is, for example needed to do virtual calls.
同步块索引是一个指数到同步块的表。每个对象可以有一个同步块,包含使用 Monitor.Enter
和 Monitor.Exit
信息。
The sync block index is an index into a table of synchronisation blocks. Each object can have a sync block, that contains information used by Monitor.Enter
and Monitor.Exit
.
这篇关于什么样的数据都存储在“类型对象的指针”和“同步块指数”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!