IAllocator

Constructors

this
this(size_t bucket_element_sizeof)

Constructor.

Members

Classes

IParkingStack
class IParkingStack

Helper class to temprarily park a certain number of objects.

Functions

allocate
void* allocate()

Performs the actual allocation of an object

deallocate
void deallocate(void* old)

Performs the actual recycling of an object. See recycle() documentation.

get
void* get()

Gets or allocates an object

memoryUsed
size_t memoryUsed()

Return the amount of memory currently used.

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.

recycle
void recycle(void* old)

Recycles or deletes an object that is no longer used.

Variables

bucket_element_size
size_t bucket_element_size;

Stores the size of a single allocated element.

Meta