BucketElementFreeList

Free list of currently unused bucket elements.

Constructors

this
this()

Constructor.

Members

Functions

getNext
void* getNext(void* element)

Obtains the next element of element.

newElement
void* newElement()

Allocates a bucket element.

setNext
void setNext(void* element, void* next)

Sets the next element of element.

Inherited Members

From IBucketElementFreeList

allocate
void* allocate()

Obtains an object either from the free list, if available, or from new_object if the free list is empty.

newElement
void* newElement()

Allocates a new object. Called by get() if the list is empty.

deallocate
void deallocate(void* old_object)

Appends old_object to the free list.

length
size_t length()
getNext
void* getNext(void* object)

Obtains the next object of object. object is never null but the next object may be.

setNext
void setNext(void* object, void* next)

Sets the next object of object. object is never null but next may be.

parkElements
void parkElements(size_t n, void delegate(IParkingStack park) dg)

Calls dg with an IParkingStack instance that is set up to keep n elements.

ParkingStack
class ParkingStack

Allows using the free list as a stack to park objects without marking them as free. The parked object are appended to the free list after the free objects currently in the list. At most one ParkingStack instance may exist at a time. While a ParkingStack instance exists, no public FreeList method may be used.

Meta