View source code
Display the source code in std/experimental/allocator/building_blocks/bitmapped_block.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Function std.experimental.allocator.building_blocks.bitmapped_block.BitmappedBlock.this

Constructs a block allocator given a hunk of memory, or a desired capacity in bytes.

this (
  ubyte[] data
);

this (
  ubyte[] data,
  uint blockSize
);

this (
  size_t capacity
);

this (
  size_t capacity,
  uint blockSize
);

  • If ParentAllocator is NullAllocator, only the constructor taking data is defined and the user is responsible for freeing data if desired.
  • Otherwise, both constructors are defined. The data-based constructor assumes memory has been allocated with the parent allocator. The capacity-based constructor uses ParentAllocator to allocate an appropriate contiguous hunk of memory. Regardless of the constructor used, the destructor releases the memory by using ParentAllocator.deallocate.

Authors

License