Scalability of the .NET 4 garbage collector

后端 未结 5 456
没有蜡笔的小新
没有蜡笔的小新 2021-02-02 16:16

I recently benchmarked the .NET 4 garbage collector, allocating intensively from several threads. When the allocated values were recorded in an array, I observed no scalability

5条回答
  •  梦毁少年i
    2021-02-02 16:52

    Not a complete answer to the question, but just to clear up some misconceptions: the .NET GC is only concurrent in workstation mode. In server mode, it uses stop-the-world parallel GC. More details here. The separate nurseries in .NET are primarily to avoid synchronisation on allocation; they are nevertheless part of the global heap and cannot be collected separately.

提交回复
热议问题