4 ms·
If you wanted to, you could set GCSettings.LatencyMode [1] to LowLatency [2] > Enables garbage collection that is more conservative in reclaiming objects. Full
by taspeotis 13y ago
If you wanted to, you could set GCSettings.LatencyMode [1] to LowLatency [2]
> Enables garbage collection that is more conservative in reclaiming objects. Full collections occur only if the system is under memory pressure, whereas generation 0 and generation 1 collections might occur more frequently ... This mode is not available for the server garbage collector.
Just for fun, you wouldn't want to run in LowLatency for too long.
[1] http://msdn.microsoft.com/en-us/library/system.runtime.gcsettings.latencymode(v=vs.110).aspx http://msdn.microsoft.com/en-us/library/system.runtime.gcset...
[2] http://msdn.microsoft.com/en-us/library/system.runtime.gclatencymode(v=vs.110).aspx http://msdn.microsoft.com/en-us/library/system.runtime.gclat...
- logicchains 13y agoInteresting. I suspect for this particular program it'd have to be in low latency mode for the entire run. It doesn't seem to make too much of a different to the C#2 implementation however (the one using sensible allocation), so I suspect that one isn't generating too much garbage.