AppDomains 和 GC 堆 [英] AppDomains and GC Heap

查看:45
本文介绍了AppDomains 和 GC 堆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有单个 GC 堆进程以每个应用程序域都可以访问特定分区的方式进行广泛分区?还是每个应用程序域都有单独的 GC 堆?我确定其他堆,例如 HF 堆、LF 堆、存根堆、句柄表等等……所有这些堆都是为每个应用程序域单独分配的吗?GC 堆是否也被单独分配?

Is there single GC Heap process wide partitioned in such a way that each Application Domain has access to specific partition ? Or each Application Domain has separate GC Heap? I am sure about the other heaps such as HF Heap, LF Heap, Stub Heap, Handle Table and few more..., all these heaps are allocated separately for each application domain? Does the GC Heap also gets allocated separately?

这可能是正确的,因为对象不能在 AppDomain 之间传递,除非对象是可序列化的或作为 MarshalByRef 实现的.我在想是否有一个叫做 AppDomainID 的东西与每个对象相关联,对象头(同步块)存储有关 AppDomainID 的信息?

This may probably be true as objects cannot be passed between AppDomains unless object is serializable or implemented as MarshalByRef. I was thinking if there is something called AppDomainID associated with each object and Object Header (Sync Block) stores the information regarding the AppDomainID?

推荐答案

你有一个进程的堆,并且应用程序域共享这个堆.

You have heap for an process, and the app domains share this heap.

一个应用程序域保持轻量级进程,作为进程中的隔离单元.

An Application Domain stay light-weight process that functions as unit of isolation in process.

这篇关于AppDomains 和 GC 堆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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