UraniumCompute 0.1.0
A GPU accelerated parallel task scheduler
UN::IAllocator Class Referenceabstract

An interface for memory allocators. More...

#include <IAllocator.h>

Inheritance diagram for UN::IAllocator:
UN::SystemAllocator

Public Member Functions

virtual void * Allocate (USize size, USize alignment)=0
 Allocate memory. More...
 
virtual void Deallocate (void *pointer)=0
 Deallocate memory. More...
 
virtual const char * GetName () const =0
 Get debug name of the allocator. More...
 

Detailed Description

An interface for memory allocators.

Member Function Documentation

◆ Allocate()

virtual void * UN::IAllocator::Allocate ( USize  size,
USize  alignment 
)
pure virtual

Allocate memory.

Parameters
size- Size of the allocation in bytes.
alignment- Alignment of the allocation in bytes.
Returns
Pointer to the allocated block of memory.

Implemented in UN::SystemAllocator.

◆ Deallocate()

virtual void UN::IAllocator::Deallocate ( void *  pointer)
pure virtual

Deallocate memory.

Parameters
pointer- A pointer to the block of memory to deallocate.

Implemented in UN::SystemAllocator.

◆ GetName()

virtual const char * UN::IAllocator::GetName ( ) const
pure virtual

Get debug name of the allocator.

Implemented in UN::SystemAllocator.


The documentation for this class was generated from the following file: