Game Engine
Architected a C++ game engine with a runtime reflection system - employing Chain of
Loading...
Searching...
No Matches
Fiea::Engine::Memory::Allocator Struct Reference

#include <MemoryService.h>

Public Member Functions

void * Alloc (size_t size) const
 Allocates memory from the heap.
void * Alloc (size_t size, const char *file, size_t line) const
 Allocates memory with debugging information.
void Free (void *ptr) const
 Frees memory in the heap.
 Allocator (const Allocator &other)=default
Allocatoroperator= (const Allocator &rhs)=default
 ~Allocator ()=default

Friends

class MemoryService

Constructor & Destructor Documentation

◆ Allocator()

Fiea::Engine::Memory::Allocator::Allocator ( const Allocator & other)
default
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~Allocator()

Fiea::Engine::Memory::Allocator::~Allocator ( )
default

Member Function Documentation

◆ Alloc() [1/2]

void * Fiea::Engine::Memory::Allocator::Alloc ( size_t size) const
nodiscard

Allocates memory from the heap.

Parameters
sizeThe size of the memory block to allocate.
Returns
Pointer to the allocated memory.

◆ Alloc() [2/2]

void * Fiea::Engine::Memory::Allocator::Alloc ( size_t size,
const char * file,
size_t line ) const
nodiscard

Allocates memory with debugging information.

Parameters
sizeThe size of the memory block to allocate.
fileThe file name where the allocation occurs.
lineThe line number where the allocation occurs.
Returns
Pointer to the allocated memory.

◆ Free()

void Fiea::Engine::Memory::Allocator::Free ( void * ptr) const

Frees memory in the heap.

Parameters
ptrPointer to the memory block to free.

◆ operator=()

Allocator & Fiea::Engine::Memory::Allocator::operator= ( const Allocator & rhs)
default
Here is the call graph for this function:

◆ MemoryService

friend class MemoryService
friend

The documentation for this struct was generated from the following files: