A specialized block used by the BuddyAllocator.
Buddy blocks have outer sizes that are powers of two. When smaller blocks are needed, a block is split into left and right halves of equal size. These half-blocks are "buddies", and when both are freed they are merged back into a single block.
|
| BuddyBlock (size_t outer_size) |
|
StatusWithSize | CanAlloc (Layout layout) const |
|
BuddyBlock * | Split () |
| Splits a block in half and returns the new block.
|
|
| BasicBlock (const BasicBlock &other)=delete |
|
BasicBlock & | operator= (const BasicBlock &other)=delete |
|
constexpr std::byte * | UsableSpace () |
|
constexpr const std::byte * | UsableSpace () const |
|
constexpr std::byte * | UsableSpaceUnchecked () |
|
constexpr const std::byte * | UsableSpaceUnchecked () const |
|
constexpr size_t | OuterSize () const |
|
constexpr size_t | InnerSize () const |
|
constexpr size_t | InnerSizeUnchecked () const |
|
constexpr bool | IsValid () const |
|
constexpr bool | CheckInvariants () const |
| Like IsValid , but crashes if invalid.
|
|