4 ms·
GC Pauses and Safe Points in the CLR
- bjourne 10y agoI wonder why a rewritten noop rotine is used instead of a segfaulting instruction for polling, like HotSpot uses? E.g MOV [RIP+<addr>], EAX with [RIP+<addr>] pointing to memory that gets write-protected when GC is needed. I think that should be much faster than CALL <addr> with the routine at <addr> being rewritten.
- matthewwarren 10y agoI wondered the same after I figured out what the CLR does. I don't honestly know, maybe for the CLR using CALL <addr> is fast enough? I'd be interested to know the real reason though.
- xenadu02 10y agoThis is interesting but there is a lot more to .NET GC. There is a concurrent GC, low-latency "pause-less" GC, etc.
- matthewwarren 10y ago> This is interesting but there is a lot more to .NET GC. Yeah, but one post covering the entire .NET GC would be huge!! This post was only meant to cover GC Pauses and Safepoints. > There is a concurrent GC, low-latency "pause-less" GC, etc. I covered some of these topics in other posts, see: - http://mattwarren.org/2016/02/04/learning-how-garbage-collectors-work-part-1/ http://mattwarren.org/2016/02/04/learning-how-garbage-collec... - http://mattwarren.org/2016/06/20/Visualising-the-dotNET-Garbage-Collector/ http://mattwarren.org/2016/06/20/Visualising-the-dotNET-Garb... - http://mattwarren.org/2016/08/16/Preventing-dotNET-Garbage-Collections-with-the-TryStartNoGCRegion-API/ http://mattwarren.org/2016/08/16/Preventing-dotNET-Garbage-C...