Comment #1 by n8sh.secondary — 2020-01-31T08:43:45Z
FreeList implements deallocateAll and appears to have already done so at the time this issue was created.
Comment #2 by b2.temp — 2020-01-31T11:09:12Z
It does not. If you look carefully it only appears that it is implemented because
of the DbI style. So if you make a FreeList with Mallocator you cant deallocate all.
here is a test case to prevent any further confusion
---
void main() {}
struct TestCase
{
import std.experimental.allocator.mallocator : Mallocator;
import std.experimental.allocator.building_blocks : FreeList;
FreeList!(Mallocator, 16, 16) freeList;
~this()
{
freeList.deallocateAll;
}
}
---
Comment #3 by atila.neves — 2022-07-18T16:26:36Z
FreeList implements deallocateAll iff the parent allocator implements it. There's no way for FreeList!Mallocator to do that since there's no way to deallocateAll for Mallocator. If you want to be able to call deallocateAll with a FreeList, use a different parent allocator that has that capability.
Comment #4 by robert.schadek — 2024-12-01T16:26:46Z