【发布时间】:2010-05-28 14:36:47
【问题描述】:
在上一个问题中我问过possible programatic ways of maximising the largest block allocatable on the LOH。我仍然看到问题,但现在我试图弄清楚为什么 LOH 的大小似乎会增长和缩小,但我仍然看到 OutOfMemoryExceptions 与其他人报告的由于 LOH 碎片化的情况相符.
为什么一个调用,例如,StringBuilder.EnsureCapacity 可能会为我抛出一个 OutOfMemoryException,但从其他地方调用另一个会导致 LOH 的大小扩大(根据性能计数器,它正在增长和缩小)?
【问题讨论】:
标签: c# .net memory-management fragmentation large-object-heap