btdu - a sampling disk usage profiler for btrfs (written in D)

Vladimir Panteleev thecybershadow.lists at
Fri Nov 27 10:31:21 UTC 2020

On Friday, 27 November 2020 at 10:26:18 UTC, Ola Fosheim Grostad 
> On Friday, 27 November 2020 at 10:20:41 UTC, Vladimir Panteleev 
> wrote:
>> However, that wouldn't help in this case, because the problem 
>> here doesn't come from allocations, but from the 
>> stop-the-world aspect of the GC.
>> A theoretical non-stop-the-world GC would indeed help in this 
>> situation, but such a GC is only possible if you restrict the 
>> language to a subset, such that all copies of managed objects 
>> are always visible to the compiler. It would require all 
>> @system / extern(C) code to be carefully re-scrutinized. In 
>> short, this would essentially be a different language (based 
>> on D). I don't think we can get there from where we are now.
> Hm, but it would only stop a single thread. You would not be 
> allowed to share nonpinned objects with other threads.

Right, so that's another imposed limitation of such a GC. You'd 
still also lose the ability to memcpy or memset a struct that had 
managed pointers, as that would break the reference count that 
the GC relies on to work. It would definitely solve the 
performance problem, but it would be such a radical change that 
it would essentially be a different language (and debatedly no 
longer a system-programming one).

More information about the Digitalmars-d mailing list