www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - test a dfeed bug

Message body.

     void deallocateNode()
     {
         assert(first !is null);
         import stdx.allocator.mallocator : Mallocator;

         Node* next = first.next;
         ubyte[] mem = (cast(ubyte*) first)[0 .. Node.sizeof + 
first.mem.length];
         version (debug_rollback_allocator)
             mem[] = 0;
         Mallocator.instance.deallocate(mem);
         first = next;
     }
Oct 23 2018