www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - std.allocator suggestions

1. Allocator which preallocates a fixed amount of extra bytes for each
chunk, so that reallocations within that limit are guaranteed to be
in-place. Multiple reallocations should be supported, too, e.g. if the
limit is 10 it allocates 210 bytes when 200 are requested and then reallocs
200 -> 205 -> 203 -> 210 are all in-place.

2. Allocator similar to Region that counts numbers of
allocations/deallocations, and once the difference reaches zero, reuses the
buffer instead of returning null.

3. Same as above but instead calls deallocate when difference reaches zero.
This would allow to use regions allocated by malloc with cascading
allocator.
Nov 29 2013