BigInt -- a challenge for std.allocator

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Oct 30 08:21:31 PDT 2013


On 10/30/13 5:39 AM, Joseph Rushton Wakeling wrote:
> On 30/10/13 01:38, inout wrote:
>> This has almost nothing to do with an allocator.
>
> My impression was that std.allocator as-is was designed to create a
> toolkit for developers to build different memory management strategies
> into their applications.  Is there any reason why that should exclude
> implementing ref-counting approaches?
>
> As I said at the start, I'm looking to be educated, so I'd appreciate
> you explaining why something is wrong rather than just telling me.

Reference counting comes somewhere on top of allocators. (For a long 
time I thought they should be fused; now I think they can be neatly 
separated.) Allocators know how to manage void[] and that's about it.

Andrei



More information about the Digitalmars-d mailing list