Will std.allocator make it easy to bypass the GC?

maik klein via Digitalmars-d digitalmars-d at puremagic.com
Sat Nov 14 06:56:55 PST 2015


http://dlang.org/phobos/std_experimental_allocator.html

I am not sure what the plan is but it seems to me that the 
standard library could make use of the "theAllocator" for 
allocation and also allow you to swap in different allocators.

So could it then be possible to completely bypass the GC once 
"allocators" are used by the std?

I imagine that we could set "theAllocator = Malloc" and every 
allocation will use malloc? Or maybe some function allocates by 
default but you know that the allocation is small enough to be 
allocated on the stack which would allow us to call the function 
like this "someFunction!(StackAlloactor)(foo);" ?


More information about the Digitalmars-d mailing list