|
| block ()=default |
| Construct a default block.
|
|
| block (char *pointer, size_t size) |
| Construct a block given a pointer and size. More...
|
|
| block (void *pointer, size_t size) |
| Construct a block given a void pointer and size. More...
|
|
void * | pointer () const |
| Returns the underlying pointer.
|
|
size_t | size () const |
| Returns the size of the block.
|
|
bool | is_valid () const |
| Returns true if this block is valid (non-null), false otherwise.
|
|
bool | is_superblock () const |
| Returns true if this block is a superblock, false otherwise.
|
|
bool | is_contiguous_before (block const &b) const |
| Verifies whether this block can be merged to the beginning of block b. More...
|
|
bool | fits (std::size_t sz) const |
| Is this block large enough to fit sz bytes? More...
|
|
std::pair< block, block > | split (std::size_t sz) const |
| Split this block into two by the given size. More...
|
|
block | merge (block const &b) const |
| Coalesce two contiguous blocks into one. More...
|
|
bool | operator< (block const &b) const |
| Used by std::set to compare blocks.
|
|
Represents a chunk of memory that can be allocated and deallocated.
A block bigger than a certain size is called a "superblock".