Allocator

Base allocator interface.

All memory obtained with allocate must be disposed by deallocate on the same allocator instance.

NOTE: Unlike std.experimental.allocator, we always require a deallocation procedure.

Members

Functions

allocate
void[] allocate(size_t size)

Attempts to allocate a memory block of size bytes.

deallocate
void deallocate(void[] memory)

Deallocates a previously-allocated memory block.

Properties

alignment
uint alignment [@property getter]

Minimum alignment of all allocated memory blocks.