开发者

When the .NET Garbage Collection compacts the heap is the "Allocate Bytes" performance counter updated?

The .NET CLR's Garbage Collector compacts the heap. I take this to mean t开发者_Python百科hat as it sweeps through to remove unmarked objects, the next (still live) object on the heap gets moved up. Hence, from my understanding, compacting moves objects. When those objects are moved, does the move impact the Allocated Bytes/Sec performance counter? Or is this counter simply how many bytes added onto the heap?


According to this article on GC perf counters, the "Allocated bytes/s" counter is accounting for the number of allocated bytes for objects in Gen0 and LOH. Since the Gen0 is always emptied after each Gen0 GC and LOH is never subject to defragmentation, it should not affect this metric.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜