why allocators are not discussed here

Dmitry Olshansky dmitry.olsh at gmail.com
Wed Jun 26 14:00:50 PDT 2013


27-Jun-2013 00:53, Dicebot пишет:
> On Wednesday, 26 June 2013 at 19:40:54 UTC, Dmitry Olshansky wrote:
>> Sadly I believe that global allocators would still have to be
>> compatible with GC (to not break code in hard to track ways) thus
>> basically being a GC. Hence we can easily stop talking about them ;)
>
> Nice way to say "we don't really need that embedded, kernel and gamedev
> guys". GC as a safe an obvious approach should be the default but
> druntime needs to provide means for tight and dangerous control upon
> explicit request.

Just don't use certain built-ins. Stub them out in run-time if you like. 
The only problematic point I see is closures allocated on heap.

Frankly I see embedded, kernel and gamedev guys using ref-counting and 
custom data structures all the time. They all want that level of control 
and determinism anyway or are so resource constrained that GC is too 
much code space or run-time overhead anyway.

Needless to say that custom run-time for the first 2 categories is 
required anyway so just hack the druntime. It would be nice to have 
hooks readily available (and documented?) to do so but hardly beyond that.

-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list