October 06, 2008
Hi,

Sorry for this stupid question but what is the difference between the boehm gc found in GCC sources and the garbage stategy used in D ?
October 06, 2008
Vincent Richomme wrote:
> Hi,
> 
> Sorry for this stupid question but what is the difference between the boehm gc found in GCC sources and the garbage stategy used in D ?

There's functionally little difference between the two.  Both are conservative mark-sweep GCs.


Sean
October 07, 2008
Sean Kelly wrote:
> Vincent Richomme wrote:
>> Hi,
>>
>> Sorry for this stupid question but what is the difference between the boehm gc found in GCC sources and the garbage stategy used in D ?
> 
> There's functionally little difference between the two.  Both are conservative mark-sweep GCs.
> 
> 
> Sean

I believe D's GC is (automatically) type aware while Boehm GC isn't. This means D's GC does not spend time scanning atomic data (data with no pointers) such as strings, audio samples, pixmaps, etc, while Boehm GC would.  In theory this optimization allows it to run faster and prevent some memory leaks.  I think that Boehm GC allows you to manually tell it when things are atomic though, so if you are meticulous about it you could have the same optimization with Boehm GC.
Top | Discussion index | About this forum | D home