Memory Management in 2021?

Max Haughton maxhaton at gmail.com
Sat Jan 2 00:03:11 UTC 2021


On Friday, 1 January 2021 at 18:22:31 UTC, IGotD- wrote:
> On Friday, 1 January 2021 at 17:07:17 UTC, Ola Fosheim Grøstad 
> wrote:
>> Is there a rough plan for where D is heading with memory 
>> management in 2021?
>>
>> Just roughly?
>>
>> I also wonder if it would be possible to use refcounting (or 
>> ARC) for everything except class objects. Then add write 
>> barriers for pointers to class objects only and leave those 
>> garbage collected with a lower latency incremental mark/sweep 
>> collector. That should work out mostly ok for performance?
>
> We absolutely need a roadmap and a vision where D needs to go 
> when it comes to memory management. Many of us expected this to 
> clear up with Walter's presentation at Dconf 2020 but it was 
> more basic explaining the concepts with the borrow/checker and 
> was not something that revealed any information about any 
> direction of the memory management in D.
>
> This is a subject with a lot of opinions but the D project has 
> to do through with this despite it demands a lot of work and 
> discussions.

I mentioned having a working group on memory safety previously. 
If I all goes to plan I am supposed to be Mike's glamorous 
assistant soon-ish(?) (thank you symmetry), and I would be very 
interesting in running something along those lines.

Memory safety is a bit of Pandora's box, though, because it means 
getting move semantics right not only directly but also in what 
to do with the moved-from object (for example). We have the 
option to not be C++ on this matter, and we should probably take 
it.

What @live does is where we should be aiming for - RAII alone 
isn't good enough any more.


More information about the Digitalmars-d mailing list