Disable GC entirely

Manu turkeyman at gmail.com
Mon Apr 8 04:14:01 PDT 2013


On 8 April 2013 20:57, Regan Heath <regan at netmail.co.nz> wrote:

> On Mon, 08 Apr 2013 09:58:15 +0100, Manu <turkeyman at gmail.com> wrote:
>
>> I suspect Andrei for one knows this, and that's why the D containers are
>> so... barely existing. The language is not yet ready to say with
>> confidence
>> how they should look.
>>
>
> That, and before you can design the containers you need a concrete
> allocator interface design.  Actually, this is likely the same blocker for
> GC-free D as well.
>
> D should have a set of global allocator hooks.


True. I've been saying for a long time that I'd really like filesystem
hooks too while at it!


If it did, you could easily catch unexpected allocations in tight loops and
> realtime code.  If it did, GC-free D would be trivial - just replace the
> default GC based allocator with a malloc/free one, or any other scheme you
> like.
>

D doesn't have a delete keyword, which is fairly important if you want to
manually manage memory...


The hooks would ideally pass __FILE__ and __LINE__ information down from
> the call site in debug mode, etc.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130408/2105779c/attachment.html>


More information about the Digitalmars-d mailing list