CPPAllocator

Members

Functions

alignedAllocate
void[] alignedAllocate(size_t bytes, uint alignment)

Allocates the size expressed in bytes aligned by alignment.

allocate
void[] allocate(size_t bytes)

Allocates the size expressed in bytes.

deallocate
bool deallocate(void[] b)

Deallocate the specified memory block

Static variables

instance
CPPAllocator instance;

Returns the global instance of this allocator type. CppNew is thread-safe, all methods are shared.

Variables

alignment
enum uint alignment;

The alignment is a static constant equal to platformAlignment, which ensures proper alignment for any D data type.

Meta