Versions Compared

Key

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

class Geo::BasicAllocator

A basic memory allocator.

Typedefs

NameDescription
std::size_t size_type

The type used to represent memory sizes.

Functions

NameDescription
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.


Anchor
a1e62210725a178fc216c24246cf5e28c
a1e62210725a178fc216c24246cf5e28c

void* Geo::BasicAllocator::Allocate

...

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

...

Find the first fit free block and do the allocation.


Anchor
acecd88e39fecfa70189d2e59e62f44c4
acecd88e39fecfa70189d2e59e62f44c4

Geo::BasicAllocator::BasicAllocator

...

public: BasicAllocator
(
    void * memory,
    size_type size
)

...

Creates a BasicAllocator that allocates memory within the given block.


Anchor
a2c869ac5455fc3ca87e69f1a013f60b2
a2c869ac5455fc3ca87e69f1a013f60b2

void Geo::BasicAllocator::Free

...

public: void Free
(
    void * mem
)

...

Free an existing allocation.


Anchor
a0808af7af8b3cc2a0263563b9771fb86
a0808af7af8b3cc2a0263563b9771fb86

bool Geo::BasicAllocator::IsAllocationValid

...

public: bool IsAllocationValid
(
    void * mem
)

...

Checks if a block of memory is a valid allocation.