Lugdunum  0.1.0
Classes | Public Member Functions | Private Attributes | List of all members
lug::System::Memory::FreeList Class Reference

#include <FreeList.hpp>

Collaboration diagram for lug::System::Memory::FreeList:
[legend]

Classes

struct  Element
 

Public Member Functions

 FreeList (size_t size)
 
 FreeList (const FreeList &)=default
 
 FreeList (FreeList &&)=default
 
FreeListoperator= (const FreeList &)=default
 
FreeListoperator= (FreeList &&)=default
 
 ~FreeList ()=default
 
bool grow (void *start, void *end, size_t alignment, size_t offset)
 
void * allocate ()
 
void free (void *ptr)
 
void reset ()
 

Private Attributes

size_t _size
 
Element_nextFree {nullptr}
 

Detailed Description

Definition at line 10 of file FreeList.hpp.

Constructor & Destructor Documentation

◆ FreeList() [1/3]

lug::System::Memory::FreeList::FreeList ( size_t  size)
explicit

Definition at line 9 of file FreeList.cpp.

◆ FreeList() [2/3]

lug::System::Memory::FreeList::FreeList ( const FreeList )
default

◆ FreeList() [3/3]

lug::System::Memory::FreeList::FreeList ( FreeList &&  )
default

◆ ~FreeList()

lug::System::Memory::FreeList::~FreeList ( )
default

Member Function Documentation

◆ operator=() [1/2]

FreeList& lug::System::Memory::FreeList::operator= ( const FreeList )
default

◆ operator=() [2/2]

FreeList& lug::System::Memory::FreeList::operator= ( FreeList &&  )
default

◆ grow()

bool lug::System::Memory::FreeList::grow ( void *  start,
void *  end,
size_t  alignment,
size_t  offset 
)

Definition at line 13 of file FreeList.cpp.

◆ allocate()

void * lug::System::Memory::FreeList::allocate ( )

Definition at line 51 of file FreeList.cpp.

◆ free()

void lug::System::Memory::FreeList::free ( void *  ptr)

Definition at line 61 of file FreeList.cpp.

◆ reset()

void lug::System::Memory::FreeList::reset ( )

Definition at line 68 of file FreeList.cpp.

Member Data Documentation

◆ _size

size_t lug::System::Memory::FreeList::_size
private

Definition at line 33 of file FreeList.hpp.

◆ _nextFree

Element* lug::System::Memory::FreeList::_nextFree {nullptr}
private

Definition at line 34 of file FreeList.hpp.


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