D on next-gen consoles and for game development

Patrick Down patrick.down at gmail.com
Sat May 25 11:43:42 PDT 2013


On Saturday, 25 May 2013 at 05:29:31 UTC, deadalnix wrote:

> This is technically possible, but you said you make few 
> allocations. So with the tax on pointer write or the reference 
> counting, you'll pay a lot to collect very few garbages. I'm 
> not sure the tradeoff is worthwhile.
>

Incidentally, I ran across this paper that talks about a 
reference counted garbage collector that claims to address this 
issue.  MIght be of interest to this group.

http://researcher.watson.ibm.com/researcher/files/us-bacon/Bacon03Pure.pdf

 From the paper:

There are two primary problems with reference counting, namely:
(1) run-time overhead of incrementing and decrementing the 
reference count each time a
pointer is copied, particularly on the stack; and
(2) inability to detect cycles and consequent necessity of 
including a second garbage collection technique to deal with 
cyclic garbage.
In this paper we present new algorithms that address these 
problems and describe a
new multiprocessor garbage collector based on these techniques 
that achieves maximum
measured pause times of 2.6 milliseconds over a set of eleven 
benchmark programs that
perform significant amounts of memory allocation.



More information about the Digitalmars-d mailing list