BucketElementGCAllocator

A bucket element allocator using the D runtime memory manager. Even though this memory manager is called "GC-managed" this class in fact doesn't rely on garbage collection but explicitly deletes unused bucket elements.

class BucketElementGCAllocator : IBucketElementGCAllocator (
Bucket
) {}

Constructors

this
this()

Constructor.

Members

Functions

allocate
void* allocate()

Gets or allocates an object

Inherited Members

From IBucketElementGCAllocator

deallocate
void deallocate(void* element)

Deletes a bucket element that is no longer used.

ParkingStack
class ParkingStack

Helper class to temprarily park a certain number of bucket elements.

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.

Meta