Thread overview
[Issue 16008] FreeList should implement deallocateAll, as SharedFreeList does
Jun 02, 2016
b2.temp@gmx.com
Jan 31, 2020
Nathan S.
Jan 31, 2020
Basile-z
Jul 18, 2022
Atila Neves
Dec 17, 2022
Iain Buclaw
June 02, 2016
https://issues.dlang.org/show_bug.cgi?id=16008

b2.temp@gmx.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
           Assignee|b2.temp@gmx.com             |nobody@puremagic.com

--
January 31, 2020
https://issues.dlang.org/show_bug.cgi?id=16008

Nathan S. <n8sh.secondary@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |n8sh.secondary@hotmail.com
         Resolution|---                         |FIXED

--- Comment #1 from Nathan S. <n8sh.secondary@hotmail.com> ---
FreeList implements deallocateAll and appears to have already done so at the time this issue was created.

--
January 31, 2020
https://issues.dlang.org/show_bug.cgi?id=16008

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #2 from Basile-z <b2.temp@gmx.com> ---
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;
    }
}
---

--
July 18, 2022
https://issues.dlang.org/show_bug.cgi?id=16008

Atila Neves <atila.neves@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |atila.neves@gmail.com

--- Comment #3 from Atila Neves <atila.neves@gmail.com> ---
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.

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=16008

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P4

--