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:
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
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
精彩评论