2 ==================================
3 D Newsgroups collected information
4 ==================================
7 This is a recompilation of information collected from the `D newsgroups`__,
8 related to garbage collection (and sometimes memory management in general).
10 __ http://www.digitalmars.com/webnews/newsgroups.php
14 Programs that (used to) break the current D GC
15 ===============================================
17 These are posts with programs that (used to) break the current D GC
18 implementation (or expose some serious inefficiencies).
20 * `The problem with the D GC`__: exposes a problem with large random data
22 * `Re: DMD 1.003 release`__: exposes the same problem as the previous post
24 * `Problems with GC, trees and array concatenation`__: looks like the same
25 problem of previous posts but specific to some Tango_ IO implementation
26 (didn't checked, but I guess it's fixed in Tango_).
27 * `Slow GC?`__: exposes slow lookups in the page table of the GC, a proposed
28 patch with a simple but effective optimization is attached to the `bugzilla
29 issue`__ (fixed in Tango, still broken in both D1 and D2 phobos).
30 * `[Performance] shootout.binarytrees when implemented with gc is 10x slower
31 than C# on .NET 2.0`__: (I didn't test the C# version to compare, but I guess
33 * `thread and gc.fullCollect`__: some weird problem that seems to be because of
34 the signal used by the GC for "stopping the world".
36 __ http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=46407
37 __ http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.announce&article_id=6978
38 __ http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=54084
39 __ http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=67673
40 __ http://d.puremagic.com/issues/show_bug.cgi?id=1923
41 __ http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=43991
42 __ http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=5821
46 Other common problems with the current GC
47 =========================================
49 * `GC implementation`__: security concerns about the current conservative GC
51 * `large objects and GC`__..
52 * `Any advice for GC/memory debugging`__: tips about debugging memory leaks in
54 * `Threading and the Garbage handler mess.`__: problems (and solutions)
55 interacting with C libraries (that stores pointers) and threads.
56 * `Keeping a list of instances and garbage-collection`__: problems on
57 weak-references support in the current GC.
58 * `GC object finalization not guaranteed`__: discussion about the current
59 D specs making no guarantees about finalization.
60 * `For Leandro`__: A tiny benchmark that shows a small performance loss in the
63 __ http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=35364
64 __ http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=71869
65 __ http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=13744
66 __ http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=75952
67 __ http://www.digitalmars.com/d/archives/digitalmars/D/Keeping_a_list_of_instances_and_garbage-collection_86840.html
68 __ http://lists.puremagic.com/pipermail/digitalmars-d/2009-April/054354.html
69 __ http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=89312
73 Proposed improvements to allow a better GC
74 ==========================================
76 * `Full Reflection Gets You Smarter GC`__: some random ideas about using the
77 members-tuple feature to implement a (more) precise GC.
78 * `Is a moving GC really needed?`__: some discussion about {ad,dis}vantages and
79 possibilities of a moving GC.
80 * `GC, the simple solution`__: same but for reference counting.
81 * `How does RTTI help gc?`__: some thoughts about how and why RTTI helps
83 * `Transitioning to a type aware Garbage Collector`__: Walter Bright announces
84 that the GC will not scan anymore memory used by arrays of scalar types (only
85 void[] and structs/classes are scanned).
86 * `Partially Static GC`__: propose to do static analysis to free automatically
87 free memory at compile-time.
88 * `Moving GC`__: general discussion about making D support a moving
89 collector (there is a `bugzilla issue`__ with a list of items D need to add
91 * `Re: GC implementation, Interface`__: proposal of a GC interface that allows
92 multiple GC families implementations (RC, M&S, moving, etc.).
93 * `Std Phobos 2 and logging library?`__: : discussion about improvements to
94 the runtime to allow more precise GC (real GC discussion starts `here`__ ).
95 * `-nogc`__: add on-demand reference counting support by wrapping reference
96 handling in a Ref!T type.
97 * `Associative Arrays and Interior Pointers`__: suggests adding a new GC block
98 attribute ``NO_INTERIOR`` to indicate that an object can't have interior
99 pointer so it can be handle better by the GC avoiding keep live data because
101 * `A possible GC optimization`__: suggests an optimization that's new to Python
104 __ http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=44607
105 __ http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=42557
106 __ http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=38689
107 __ http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=29291
108 __ http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.announce&article_id=6842
109 __ http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=75995
110 __ http://thread.gmane.org/gmane.comp.lang.d.general/1137
111 __ http://d.puremagic.com/issues/show_bug.cgi?id=679
112 __ http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=35426
113 __ http://www.digitalmars.com/d/archives/digitalmars/D/Std_Phobos_2_and_logging_library_87794.html
114 __ http://www.digitalmars.com/d/archives/digitalmars/D/Std_Phobos_2_and_logging_library_87794.html#N87831
115 __ http://lists.puremagic.com/pipermail/digitalmars-d/2009-April/054613.html
116 __ http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=89394
117 __ http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=89523
121 Other posts about memory management
122 ===================================
124 Or interesting in any other way :)
126 * `TempAlloc and druntime GC`__.
127 * `Re: Compiling DMD parser?`__: an example of using the DMD frontend to parse
128 D code and get warning about unused variables (link seems to be dead).
129 * `D GC Benchmark Suite`__: Vladimir Panteleev talks about its
130 "Diamond":http //dsource.org/projects/diamond post-mortem memory debugger
131 and profiler project.
132 * `D2 weak references`__: discussion on how to implement weak references and
133 how they should be part of the collector because they are so tied together.
134 * `Re: Destructors and Deterministic Memory Management`__.
136 __ http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=82326
137 __ http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=73754
138 __ http://www.digitalmars.com/d/archives/digitalmars/D/announce/D_GC_Benchmark_Suite_15383.html#N15398
139 __ http://lists.puremagic.com/pipermail/digitalmars-d/2009-April/054121.html
140 __ http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=89410
147 This are links I got from the newsgroup for which I didn't save the original
150 * `Slow D`__: some benchmarks (source available) that shows how D can be
152 * `A little tutorial on the D GC`__: a D program/tutorial on how to make
153 advance use of the GC.
154 * `Spec needs allowances for copying garbage collection`__: bugzilla issue
155 listing that should be added to the specs in order to support copying/moving
157 * `GC Benchmark`__: Tango vs. Phobos mini GC benchmark.
158 * `Pointers on implementing read/write barriers in LDC`__.
159 * `Immix garbage collection`__: Keith Nazworth announces he wants to start
160 a new GC implementation.
161 * `Functional-style programming GC benchmark`__.
163 __ http://leonardo-m.livejournal.com/61673.html
164 __ http://www.fantascienza.net/leonardo/so/d_gc_usage.d
165 __ http://d.puremagic.com/issues/show_bug.cgi?id=679
166 __ http://www.dsource.org/projects/tango/wiki/GCBenchmark
167 __ http://groups.google.com/group/ldc-dev/browse_thread/thread/ad305b6ad8e7f443
168 __ http://www.dsource.org/projects/tango/forums/topic/743
169 __ http://codepad.org/kmyRpinz
176 Getting the offsets of struct/classes members
177 ---------------------------------------------
193 foreach (i,e; typeof(C.tupleof))
194 writefln(e.stringof, " ", C.tupleof[i].offsetof);
199 .. vim: set et sw=3 sts=3 tw=78 :