Allocation failures

Rikki Cattermole via Digitalmars-d digitalmars-d at puremagic.com
Sun Feb 14 04:16:34 PST 2016


Since you want such fine grained control, you probably don't want to use 
the GC to allocate with.

Take a look at [0].
That should give you the fine grained control you desire.

Most importantly make, makeArray, expandArray, shrinkArray and dispose.
You would need to be a bit careful with some language features like new 
to make sure you don't use them in favor of this. Keep in mind you won't 
be using the GC to deallocate with unless you add it to it (addRoot).

[0] http://dlang.org/phobos/std_experimental_allocator.html


More information about the Digitalmars-d mailing list