Castor3D 0.16.0
Multiplatform 3D engine
Classes | Public Types | Public Member Functions | List of all members
castor::BuddyAllocatorTraits Struct Reference

#include <BuddyAllocator.hpp>

Classes

struct  Block
 

Public Types

using PointerType = uint8_t *
 

Public Member Functions

 BuddyAllocatorTraits (size_t size)
 Constructor.
 
size_t getSize () const
 
PointerType getPointer (uint32_t offset)
 Creates a memory block.
 
size_t getOffset (PointerType pointer) const
 Retrieves the offset from a memory block.
 
Block getNull () const
 
bool isNull (PointerType pointer) const
 

Member Typedef Documentation

◆ PointerType

Constructor & Destructor Documentation

◆ BuddyAllocatorTraits()

castor::BuddyAllocatorTraits::BuddyAllocatorTraits ( size_t size)
inlineexplicit

Constructor.

Parameters
[in]sizeThe allocator size.

Member Function Documentation

◆ getNull()

Block castor::BuddyAllocatorTraits::getNull ( ) const
inline
Returns
The null memory block.

Referenced by isNull().

Here is the caller graph for this function:

◆ getOffset()

size_t castor::BuddyAllocatorTraits::getOffset ( PointerType pointer) const
inline

Retrieves the offset from a memory block.

Parameters
[in]pointerThe memory block.
Returns
The offset.

◆ getPointer()

PointerType castor::BuddyAllocatorTraits::getPointer ( uint32_t offset)
inline

Creates a memory block.

Parameters
[in]offsetThe block memory offset.
Returns
The block.

◆ getSize()

size_t castor::BuddyAllocatorTraits::getSize ( ) const
inline
Returns
The allocator size.

◆ isNull()

bool castor::BuddyAllocatorTraits::isNull ( PointerType pointer) const
inline
Returns
true if given pointer is null.

References castor::BuddyAllocatorTraits::Block::data, and getNull().

Here is the call graph for this function:

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