1234567891011121314151617181920212223242526272829module juptune.core.ds.block;
struct MemoryBlockAllocation
{
/++ ALIASES ++/
///
alias __xdtor = __MARMOS_BUG__;
///
alias __xpostblit = __MARMOS_BUG__;
/++ FUNCTIONS ++/
/// Returns: The number of blocks in the allocation.
ulong blockCount();
/// Frees the memory blocks back to its parent pool.
void free();
///
MemoryBlock* head();
///
MemoryBlockAllocation opAssign(MemoryBlockAllocation p);
/// Returns: The power of two size of each block. e.g. 8 = 256 bytes, 12 = 4096 bytes.
ulong powerOfTwo();
///
MemoryBlock* tail();
/// Returns: The sum of bytes across all allocated memory blocks.
ulong totalBytes();
}
An allocation of blocks from a MemoryBlockPool. All blocks in the allocation are guaranteed to be same size.
| Name | Description |
|---|---|
| __xdtor | |
| __xpostblit |
| Name | Description |
|---|---|
| blockCount |
Returns: The number of blocks in the allocation. |
| free |
Frees the memory blocks back to its parent pool. |
| head | |
| opAssign | |
| powerOfTwo |
Returns: The power of two size of each block. e.g. 8 = 256 bytes, 12 = 4096 bytes. |
| tail | |
| totalBytes |
Returns: The sum of bytes across all allocated memory blocks. |