Free list allocator, stackable on top of
another allocator. Allocation requests between min and max bytes are
rounded up to max and served from a singly-linked list of buffers
deallocated in the past. All other allocations are directed to ParentAllocator. Due to the simplicity of free list management, allocations
from the free list are fast. If adaptive is set to Yes.adaptive,
the free list gradually reduces its size if allocations tend to use the parent
allocator much more than the lists' available nodes.
				
					
						
				struct FreeList(ParentAllocator, 
ulong minSize, 
ulong maxSize
 = minSize, 
Flag!("adaptive") adaptive
 = No.adaptive)
				
;
						 
					
				 
				One instantiation is of particular interest: FreeList!(0, unbounded) puts
every deallocation in the freelist, and subsequently serves any allocation from
the freelist (if not empty). There is no checking of size matching, which would
be incorrect for a freestanding allocator but is both correct and fast when an
owning allocator on top of the free list allocator (such as Segregator) is
already in charge of handling size checking.
The following methods are defined if ParentAllocator defines them, and
forward to it: expand, owns, reallocate.
				Fields
					
						
						
							| Name | Type | Description | 
						
							| parent | ParentAllocator | The parent allocator. Depending on whether ParentAllocatorholds state
    or not, this is a member variable or an alias forParentAllocator.instance. | 
					
				
				Properties
					
						
						
							| Name | Type | Description | 
						
							| max[get] | size_t | Returns the largest allocation size eligible for allocation from the
        freelist. (If maxSize != chooseAtRuntime, this is simply an alias
        formaxSize.) All allocation requests for sizes greater than or
        equal tominand less than or equal tomaxare rounded to        maxand forwarded to the parent allocator. When the block fitting the
        same constraint gets deallocated, it is put in the freelist with the
        allocated size assumed to bemax. | 
						
							| max[set] | size_t | If FreeListhas been instantiated withmaxSize ==
        chooseAtRuntime, then themaxproperty is writable. Setting it
        must precede any allocation. | 
						
							| min[get] | size_t | Returns the smallest allocation size eligible for allocation from the
        freelist. (If minSize != chooseAtRuntime, this is simply an alias
        forminSize.) | 
						
							| min[set] | size_t | If FreeListhas been instantiated withminSize ==
        chooseAtRuntime, then theminproperty is writable. Setting it
        must precede any allocation. | 
					
				
				Methods
					
						
						
							| Name | Description | 
						
							| allocate(n) | Allocates memory either off of the free list or from the parent allocator.
    If nis within[min, max]or if the free list is unchecked
    (minSize == 0 && maxSize == size_t.max), then the free list is
    consulted first. If not empty (hit), the block at the front of the free
    list is removed from the list and returned. Otherwise (miss), a new block
    ofmaxbytes is allocated, truncated tonbytes, and returned. | 
						
							| deallocate(block) | If block.lengthis within[min, max]or if the free list is
    unchecked (minSize == 0 && maxSize == size_t.max), then inserts the
    block at the front of the free list. For all others, forwards to    parent.deallocateifParent.deallocateis defined. | 
						
							| deallocateAll() | Defined only if ParentAllocatordefinesdeallocateAll. If so,
    forwards to it and resets the freelist. | 
						
							| goodAllocSize(bytes) | If maxSize == unbounded, returnsparent.goodAllocSize(bytes).
    Otherwise, returnsmaxfor sizes in the interval[min, max], andparent.goodAllocSize(bytes)otherwise. | 
						
							| minimize() | Nonstandard function that minimizes the memory usage of the freelist by
    freeing each element in turn. Defined only if ParentAllocatordefinesdeallocate.FreeList!(0, unbounded)does not have this function. |