On Monday, 22 December 2014 at 21:09:21 UTC, Meta wrote:
There are only a couple of constructs in D that allocate, so it
may be worthwhile to let the allocator control the primitives,
i.e.:
auto gc = new GCAllocator(...);
gc.Array!char a = ['x', 'y'];
a ~= ['a', 'b']; //use
Walter's DIP: Region Based Memory Allocation
http://wiki.dlang.org/DIP46
Sandboxes for stateless programing
How about allocators stack? Allocator e.g. one of these
https://github.com/andralex/phobos/blob/allocator/std/allocator.d
-
allocatorStack.push(new GCAllocator);
//Some code that use memory allocation
auto a = ['x', 'y'];
a ~= ['a', 'b']; // use allocatorStack.top.realloc
On Monday, 22 December 2014 at 16:51:30 UTC, Allocator stack
wrote:
How about allocators stack? Allocator e.g. one of these
https://github.com/andralex/phobos/blob/allocator/std/allocator.d
-
allocatorStack.push(new GCAllocator);
//Some code that use memory allocation
auto a = ['x
On Monday, 22 December 2014 at 16:51:30 UTC, Allocator stack
wrote:
How about allocators stack? Allocator e.g. one of these
https://github.com/andralex/phobos/blob/allocator/std/allocator.d
-
allocatorStack.push(new GCAllocator);
//Some code that use memory allocation
auto a = ['x
On 23/12/2014 5:51 a.m., Allocator stack wrote:
How about allocators stack? Allocator e.g. one of these
https://github.com/andralex/phobos/blob/allocator/std/allocator.d
-
allocatorStack.push(new GCAllocator);
//Some code that use memory allocation
auto a = ['x', 'y'];
a ~= ['a', 'b