This is the documentation for Enlighten.

class Geo BasicAllocator

class Geo::BasicAllocator

A basic memory allocator.

Typedefs

Name Description
std::size_t size_type

The type used to represent memory sizes.

Functions

Name Description
Allocate(size_type, size_type)

Find the first fit free block and do the allocation.

BasicAllocator(void *, size_type)

Creates a BasicAllocator that allocates memory within the given block.

Free(void *)

Free an existing allocation.

IsAllocationValid(void *)

Checks if a block of memory is a valid allocation.


void* Geo::BasicAllocator::Allocate


public: void * Allocate
(
    size_type size,
    size_type alignment
)


Find the first fit free block and do the allocation.


Geo::BasicAllocator::BasicAllocator


public: BasicAllocator
(
    void * memory,
    size_type size
)


Creates a BasicAllocator that allocates memory within the given block.


void Geo::BasicAllocator::Free


public: void Free
(
    void * mem
)


Free an existing allocation.


bool Geo::BasicAllocator::IsAllocationValid


public: bool IsAllocationValid
(
    void * mem
)


Checks if a block of memory is a valid allocation.