BitmappedBlock.allocate

Allocates s bytes of memory and returns it, or null if memory could not be allocated.

The following information might be of help with choosing the appropriate block size. Actual allocation occurs in sizes multiple of the block size. Allocating one block is the fastest because only one 0 bit needs to be found in the metadata. Allocating 2 through 64 blocks is the next cheapest because it affects a maximum of two ulongs in the metadata. Allocations greater than 64 blocks require a multiword search through the metadata.

struct BitmappedBlock(size_t theBlockSize, uint theAlignment = platformAlignment, ParentAllocator = NullAllocator)
@trusted
void[]
allocate
(
const size_t s
)

Meta