开发者

LOH internals wanted

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 allo开发者_JAVA百科cation 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.


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  
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜