Incremental garbage collection

H. S. Teoh hsteoh at
Fri Jan 21 00:55:43 UTC 2022

On Thu, Jan 20, 2022 at 11:56:42PM +0000, Chris Katko via Digitalmars-d wrote:
> I just found out that Unity has incremental garbage collection. I
> didn't know that was a possibility for GCs.

AFAIK, Ruby has had it ages ago. It's not a new idea.

> Is that an option on a hypothetical level, for D? Or does D's language
> design preclude that. I recall some sort of issue with using
> Java/C#/whatever's garbage collector because it would have to insert
> memory barriers into D to work or something like that.

Write barriers are required for an incremental GC to work. Write
barriers are unlikely to be accepted in D because they introduce
synchonization overhead per pointer write. This would kill D's
performance in low-level code, and I don't think Walter will ever accept

> Also, it's hard to find one specific place for "news" regarding D's
> garbage collector development and "omg we deleted everything GC from
> the standard library" projects. Are there any major updates on those
> fronts?

The GC isn't going anywhere.  AFAIK there's some work to eliminate
*unnecessary* GC usage in Phobos, et al, but there is no such project to
remove *all* GC use from Phobos.


Three out of two people have difficulties with fractions. -- Dirk Eddelbuettel

More information about the Digitalmars-d mailing list