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

#include <Stack.hpp>

Collaboration diagram for lug::System::Memory::Allocator::Stack:
[legend]

Classes

struct  Mark
 

Public Member Functions

 Stack (lug::System::Memory::Area::IArea *area)
 
 Stack (const Stack &)=delete
 
 Stack (Stack &&)=default
 
Stackoperator= (const Stack &)=delete
 
Stackoperator= (Stack &&)=default
 
 ~Stack ()=default
 
void * allocate (size_t size, size_t alignment, size_t offset)
 
void free (void *ptr)
 
void reset ()
 
Mark getMark () const
 
void rewind (const Mark &mark)
 
size_t getSize (void *ptr) const
 

Private Attributes

lug::System::Memory::Area::IArea *const _area
 
void * _current {nullptr}
 
lug::System::Memory::Area::Page_currentPage {nullptr}
 
lug::System::Memory::Area::Page_firstPage {nullptr}
 

Detailed Description

Definition at line 12 of file Stack.hpp.

Constructor & Destructor Documentation

◆ Stack() [1/3]

lug::System::Memory::Allocator::Stack::Stack ( lug::System::Memory::Area::IArea area)

Definition at line 11 of file Stack.cpp.

◆ Stack() [2/3]

lug::System::Memory::Allocator::Stack::Stack ( const Stack )
delete

◆ Stack() [3/3]

lug::System::Memory::Allocator::Stack::Stack ( Stack &&  )
default

◆ ~Stack()

lug::System::Memory::Allocator::Stack::~Stack ( )
default

Member Function Documentation

◆ operator=() [1/2]

Stack& lug::System::Memory::Allocator::Stack::operator= ( const Stack )
delete

◆ operator=() [2/2]

Stack& lug::System::Memory::Allocator::Stack::operator= ( Stack &&  )
default

◆ allocate()

void * lug::System::Memory::Allocator::Stack::allocate ( size_t  size,
size_t  alignment,
size_t  offset 
)

Definition at line 17 of file Stack.cpp.

◆ free()

void lug::System::Memory::Allocator::Stack::free ( void *  ptr)

Definition at line 52 of file Stack.cpp.

◆ reset()

void lug::System::Memory::Allocator::Stack::reset ( )

Definition at line 67 of file Stack.cpp.

◆ getMark()

Stack::Mark lug::System::Memory::Allocator::Stack::getMark ( ) const

Definition at line 75 of file Stack.cpp.

◆ rewind()

void lug::System::Memory::Allocator::Stack::rewind ( const Mark mark)

Definition at line 79 of file Stack.cpp.

◆ getSize()

size_t lug::System::Memory::Allocator::Stack::getSize ( void *  ptr) const

Definition at line 84 of file Stack.cpp.

Member Data Documentation

◆ _area

lug::System::Memory::Area::IArea* const lug::System::Memory::Allocator::Stack::_area
private

Definition at line 41 of file Stack.hpp.

◆ _current

void* lug::System::Memory::Allocator::Stack::_current {nullptr}
private

Definition at line 43 of file Stack.hpp.

◆ _currentPage

lug::System::Memory::Area::Page* lug::System::Memory::Allocator::Stack::_currentPage {nullptr}
private

Definition at line 44 of file Stack.hpp.

◆ _firstPage

lug::System::Memory::Area::Page* lug::System::Memory::Allocator::Stack::_firstPage {nullptr}
private

Definition at line 45 of file Stack.hpp.


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