Using Mono SGen Garbage collector in C/C++ programs

Is it possible to use SGen garbage collector (from the mono runtime) in coventionnal C/C++ programs ? I think mono used also the Boehm-Demers-Weiser conservative garbage collector that can be used in C/C++ programs.

Answers


There are very few dependencies on the rest of the Mono code in SGen, so it should be easy to extract it out and adapt to other uses. The major difference from the Boehm collector is that it currently doesn't support a non-precise mode for heap objects, so you can't use it to replace malloc easily. It would work great, though, for managing objects for which you could provide precise reference information.


Not sure about the garbage collector that you have specified. But do you really need to use a GC on a C++ project? I never felt the use of a GC in my C++ projects. You should be good if you follow the best practices and use a decent smart pointer.


Need Your Help

check_call and command line arguments on Windows

python windows batch-file command-line-arguments scons

My python program is invoking a script on Windows using check_call:

C# Combobox (Dropdownstyle = Simple) — how to select item as you type

c# combobox

I have a Combobox control on my form (WinForms, .NET 3.5), and its DropDownStyle property is set to Simple. Let's say it is populated with the letters of the alphabet, as string objects ("a", "b", ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.