需要 LOH 内部结构

发布于 2024-11-02 03:41:53 字数 378 浏览 3 评论 0原文

我知道,这是一个实施细节,有些人认为禁止对它们感兴趣。但我仍然想找到以下内容的参考并进行确认:

  1. 大对象堆维护段中空洞的空闲列表。它用它来满足大对象的分配请求。这是否也意味着此类分配可能比来自小对象堆的常规(仅分配指针增加)分配更昂贵? 参考

  2. 在 32 位进程上,段大小的下限为 16MB。 64 位进程的大小限制是多少?

备注:此问题不要求正确的对象设计(池)解决方案。

I know, it is an implementation detail, and some people think it is forbidden to be interested into them. But I nevertheless want to find references for, and confirmation of, the following:

  1. The large object heap maintains a free-list of holes in a segment. It uses this to fullfill allocation requests for large objects. Doesn't that also mean that such allocations would potentially be more expensive than regular (only allocation pointer increasing) allocations from the small object heap? Reference

  2. On 32-bit processes, the lower limit of segment sizes is 16MB. What is that size limit for 64-bit processes?

Remark: This question does not ask for proper object design (pooling) solutions.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

就是爱搞怪 2024-11-09 03:41:53

我刚刚在 VMMap 的帮助下找到了问题的第二部分:

32 位上的最小段大小

(MS 博客中也以这种方式报告):

Initial segment size for Gen 0,1,2:       16 MB   
Initial segment size for LOH:             16 MB  
Size for larger LOH chunks:multiples of    8 MB  

64 位上(仅通过尝试发现):

Initial segment size for Gen 0,1,2:      256 MB  
Initial segment size for LOH:            128 MB  
Size for larger LOH chunks: multiples of 128 MB  

I just found out the second part of the question with the help of VMMap:

The minimum segment size

On 32 bit (is also reported that way in a MS blog):

Initial segment size for Gen 0,1,2:       16 MB   
Initial segment size for LOH:             16 MB  
Size for larger LOH chunks:multiples of    8 MB  

On 64 bit (only found out by trying):

Initial segment size for Gen 0,1,2:      256 MB  
Initial segment size for LOH:            128 MB  
Size for larger LOH chunks: multiples of 128 MB  
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文