{"id":3495,"date":"2015-01-14T10:04:55","date_gmt":"2015-01-14T10:04:55","guid":{"rendered":"http:\/\/blog.bachi.net\/?p=3495"},"modified":"2015-01-14T10:57:35","modified_gmt":"2015-01-14T10:57:35","slug":"garbage-collector-for-c-and-c","status":"publish","type":"post","link":"https:\/\/blog.bachi.net\/?p=3495","title":{"rendered":"BoehmGC: Garbage Collector for C and C++"},"content":{"rendered":"<ul>\n<li>Boehm-Demers-Weiser Conservative GC<\/li>\n<li>BoehmGC<\/li>\n<li>BDWGC<\/li>\n<\/ul>\n<p><a href=\"http:\/\/hboehm.info\/gc\/\">A garbage collector for C and C++<\/a><br \/>\n<a href=\"https:\/\/github.com\/ivmai\/bdwgc\">github: Boehm-Demers-Weiser Garbage Collector v7.5<\/a><br \/>\n<a href=\"https:\/\/github.com\/ivmai\">gitub: Ivan Maidanski<\/a><br \/>\n<a href=\"http:\/\/www.ivmaisoft.com\/\">IvMaiSoft by Ivan Maidanski<\/a><\/p>\n<p><a href=\"https:\/\/gcc.gnu.org\/wiki\/Garbage_collection_tuning\">Garbage collection tuning<\/a><br \/>\n<a href=\"https:\/\/gcc.gnu.org\/wiki\/BoehmGCForGCC\">Investigation of Boehm&#8217;s GC as GCC GC<\/a><br \/>\n<a href=\"https:\/\/gcc.gnu.org\/wiki\/LaurynasBiveinis\">User: Laurynas Biveinis<\/a><\/p>\n<p><a href=\"http:\/\/blog.gmane.org\/gmane.comp.programming.garbage-collection.boehmgc\/month=20090701\">Questions on boehm-gc, fragmentation, and low memory resources<\/a><br \/>\n<a href=\"http:\/\/lists.racket-lang.org\/users\/archive\/2003-August\/003303.html\">Boehm gc in embedded scheme application<\/a><br \/>\n<a href=\"https:\/\/matthias.benkard.de\/journal\/9\">Denkw\u00fcrdige Merkmale der Sprache C: dynamische Speicherreservierung einmal anders<\/a><br \/>\n<a href=\"http:\/\/tinygc.sourceforge.net\/\">TinyGC<\/a><br \/>\n<a href=\"http:\/\/web.engr.illinois.edu\/~maplant2\/gc.html\">Writing a Simple Garbage Collector in C<\/a><br \/>\n<a href=\"http:\/\/www.linuxjournal.com\/article\/6679\">Garbage Collection in C Programs<\/a>, LISP and Java programmers take garbage collection for granted. With the Boehm-Demers-Weiser library, you easily can use it in C and C++ projects, too. <\/p>\n<p><a href=\"http:\/\/compgroups.net\/comp.lang.lisp\/is-there-any-embeddable-lisp-or-scheme\/702694\">Is there any embeddable lisp or scheme?<\/a><br \/>\n<a href=\"http:\/\/ecls.sourceforge.net\/\">ECL &#8211; Common Lisp language<\/a> (look at the GC part!)<\/p>\n<p>Stack-based:<br \/>\n<a href=\"http:\/\/www.gnu.org\/software\/libc\/manual\/html_node\/Variable-Size-Automatic.html#Variable-Size-Automatic\">alloca(): Automatic Storage with Variable Size<\/a><\/p>\n<pre>No, that would not be possible. The fundamental design choice for the BDW\r\nGC is that it is \"conservative\": it does not know exactly which registers\r\nand local variables contain pointers, so if it were to decide to move heap\r\nobjects around, it would have no way to safely patch up all pointers to the\r\nmoved objects. (Some of the words that look like pointers to a moved object\r\nmight actually be non-pointer data).\r\n\r\nIn general a collector that moves objects demands either deep integration\r\nwith the compiler's code generator (such that every stack frame is marked\r\nup with exact where-are-the-pointers information), or very tight discipline\r\nin the source code of the client program such that moveable pointers are never\r\nstored in local variables across points calls the collector might run. The\r\nlatter is probably compatible with programmer sanity only for generated code\r\nand\/or when implementing a virtual machine.<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Boehm-Demers-Weiser Conservative GC BoehmGC BDWGC A garbage collector for C and C++ github: Boehm-Demers-Weiser Garbage Collector v7.5 gitub: Ivan Maidanski IvMaiSoft by Ivan Maidanski Garbage collection tuning Investigation of Boehm&#8217;s GC as GCC GC User: Laurynas Biveinis Questions on boehm-gc, fragmentation, and low memory resources Boehm gc in embedded scheme application Denkw\u00fcrdige Merkmale der Sprache [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3495","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/3495","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3495"}],"version-history":[{"count":7,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/3495\/revisions"}],"predecessor-version":[{"id":3502,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/3495\/revisions\/3502"}],"wp:attachment":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3495"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3495"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3495"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}