Marmos
v juptune
v asn1
v lang
v ast
v Classes
v Enums
v ir
v parser
v Enums
v Structs
v core
v crypto
v keyexchange
v memory
v data
v alphabet
v buffer
v json
v builder
v parser
v Enums
v Structs
v serialise
v Structs
v Templates
v pem
v Enums
v Structs

Structs MemoryBlockAllocation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
module 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();
    
}

Documentation

An allocation of blocks from a MemoryBlockPool. All blocks in the allocation are guaranteed to be same size.

Aliases

Name Description
__xdtor
__xpostblit

Functions

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.