Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

class Enlighten::WorkspaceAllocator

A specialised circular/stack allocator hybrid for allocating solve workspace memory.

Functions

NameDescription
Alloc(Geo::u32)

Allocate memory from the allocator.

Dealloc(void *)

Return memory to the allocator.

IsEmpty()

Is the allocator completely empty (i.e. no outstanding allocations)?

WorkspaceAllocator(Geo::u32, Geo::u32)

Construct a new allocator with a specified block and maximum size.


Anchor
a7529421d136cbbfa0a61022a95d3a1ca
a7529421d136cbbfa0a61022a95d3a1ca

void* Enlighten::WorkspaceAllocator::Alloc

...

public: void * Alloc
(
    Geo::u32 size
)

...

Allocate memory from the allocator.


Anchor
a3e728eed95d91e334f628c879141cff6
a3e728eed95d91e334f628c879141cff6

void Enlighten::WorkspaceAllocator::Dealloc

...

public: void Dealloc
(
    void * ptr
)

...

Return memory to the allocator.


Anchor
a48537778eb5de6e026d140e7d20a6c31
a48537778eb5de6e026d140e7d20a6c31

bool Enlighten::WorkspaceAllocator::IsEmpty

...

public: bool IsEmpty() const

...

Is the allocator completely empty (i.e. no outstanding allocations)?


Anchor
aef90b329153d27f85255f1331507ee15
aef90b329153d27f85255f1331507ee15

Enlighten::WorkspaceAllocator::WorkspaceAllocator

...

public: WorkspaceAllocator
(
    Geo::u32 blockSize,
    Geo::u32 maxSize
)

...

Construct a new allocator with a specified block and maximum size.