Function std.experimental.allocator.building_blocks.bitmapped_block.BitmappedBlock.allocate
Allocates s
bytes of memory and returns it, or null
if memory
could not be allocated.
void[] allocate
(
const size_t s
) pure nothrow @nogc @trusted;
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 ulong
in the metadata.
Allocations greater than 64 blocks require a multiword search through the
metadata.
If instantiated with No
, it performs a search for the first zero
bit in the bitmap and sets it.