Tag: .net internals

固定对象时的GC行为

在从mscorlib浏览PinnableObjectCache的代码时,遇到以下代码: for (int i = 0; i < m_restockSize; i++) { // Make a new buffer. object newBuffer = m_factory(); // Create space between the objects. We do this because otherwise it forms // a single plug (group of objects) and the GC pins the entire plug making // them NOT move to Gen1 and […]