]> git.llucax.com Git - personal/website.git/blob - source/blog/posts/2009/11/06-patch-to-make-d's-gc-partially-precise.rst
Add post
[personal/website.git] / source / blog / posts / 2009 / 11 / 06-patch-to-make-d's-gc-partially-precise.rst
1 Title: Patch to make D's GC partially precise
2 Tags: en, d, gc, precise
3
4 David Simcha has announced__ a couple of weeks ago that he wanted to work on
5 making the D__\ 's GC__ partially precise (only the heap). I was planning to do
6 it myself eventually because it looked like something doable with not much work
7 that could yield a big performance gain, and particularly useful to avoid
8 memory leaks due to false pointers (which can keep huge blocks of data
9 artificially alive). But I didn't had the time and I had other priorities.
10
11 __ http://www.digitalmars.com/d/archives/digitalmars/D/GC_Precision_99479.html
12 __ http://www.digitalmars.com/d/
13 __ http://en.wikipedia.org/wiki/Garbage_collection_%28computer_science%29
14
15 Anyway, after some discussion__, he finally announced__ he got the patch__,
16 which he added as a `bug report`__. The patch is being analyzed for inclusion,
17 but the main problem now is that it is not integrated with the ``new``
18 operator, so if you want to get precise heap scanning, you have to use
19 a `custom function`__ to allocate (that creates a map of the type to allocate
20 at compile-time to pass the information about the location of the pointers to
21 the GC).
22
23 __ http://www.digitalmars.com/d/archives/digitalmars/D/More_PC_Precision_Stuff_99665.html
24 __ http://www.digitalmars.com/d/archives/digitalmars/D/Success_Precisely_99757.html
25 __ http://d.puremagic.com/issues/attachment.cgi?id=489&action=diff
26 __ http://d.puremagic.com/issues/show_bug.cgi?id=3463
27 __ http://d.puremagic.com/issues/attachment.cgi?id=488
28
29 I'm glad David could work on this and I hope this can be included in D2, since
30 is a long awaited feature of the GC.
31
32 .. admonition:: Update
33
34     David Schima has been `just added`__ to the list of Phobos__ developers.
35     Maybe he can integrate his `work on associative arrays`__ too.
36
37 __ http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=100296
38 __ http://www.dsource.org/projects/phobos
39 __ http://www.dsource.org/projects/aa
40
41 .. vim: set et sw=4 sts=4 :