Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an incremental GC available for mono that I can use or get the source code for?

I'm writing tools for building games in .NET using functional style. For this, I will need an incremental GC, or some type of GC whose collection times are bounded to 1 ms or so. I read a paper on a real-time incremental GC that is a WIP for mono, but I can't find anyway to look at its code or to use it - http://static.usenix.org/event/vm04/wips/goh.pdf

To clarify what I mean by 'incremental GC', an incremental GC splits an individual garbage collection cycle into multiple slices of work that can be interleaved with program execution so that each slice can be processed in a relatively bounded amount of time. The primary intent of an incremental GC feature is to support soft-real-time applications by keeping them consistently responsive at a relatively fine-grained level. Incremental GCs elide the 'embarrassing pause' caused by mainstream GCs such as .NET's generational GC. Many systems that use incremental GC have collection pauses bound roughly at 1ms. This is perfect for games as they need to run their whole cycle inside 16.667ms. The .NET generational GC, OTOH, will cause typical pauses of 200ms.

I really would like to avoid sinking the time into writing my own incremental GC for mono, so if someone could tell me what alternative (soft)real-time centric GCs are currently available, that would be great. If I need to write my own GC, it would be great to have an open source GC that would serve as a good reference for someone writing their own mono GC from scratch.

EDIT: added elaboration of what is meant by 'incremental' GC.

like image 830
Bryan Edds Avatar asked Jul 26 '12 12:07

Bryan Edds


1 Answers

I don't know if there is an incremental GC for Mono with sources - but there is one (targeted for an oCaml-derived language) that is both open source and seems to be focused on high-performance called HLVM. The author, Jon Harrop also has a blog here with many excellent articles on garbage collection and related technologies.

Hope this helps!

like image 121
Ani Avatar answered Sep 18 '22 13:09

Ani