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

#include <Linear.hpp>

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

Classes

struct  Mark
 

Public Member Functions

 Linear (lug::System::Memory::Area::IArea *area)
 
 Linear (const Linear &)=delete
 
 Linear (Linear &&)=default
 
Linearoperator= (const Linear &)=delete
 
Linearoperator= (Linear &&)=default
 
 ~Linear ()=default
 
void * allocate (size_t size, size_t alignment, size_t offset)
 
void free (void *ptr) const
 
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 Linear.hpp.

Constructor & Destructor Documentation

◆ Linear() [1/3]

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

Definition at line 11 of file Linear.cpp.

◆ Linear() [2/3]

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

◆ Linear() [3/3]

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

◆ ~Linear()

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

Member Function Documentation

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ allocate()

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

Definition at line 17 of file Linear.cpp.

◆ free()

void lug::System::Memory::Allocator::Linear::free ( void *  ptr) const

Definition at line 49 of file Linear.cpp.

◆ reset()

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

Definition at line 53 of file Linear.cpp.

◆ getMark()

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

Definition at line 61 of file Linear.cpp.

◆ rewind()

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

Definition at line 65 of file Linear.cpp.

◆ getSize()

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

Definition at line 70 of file Linear.cpp.

Member Data Documentation

◆ _area

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

Definition at line 41 of file Linear.hpp.

◆ _current

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

Definition at line 43 of file Linear.hpp.

◆ _currentPage

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

Definition at line 44 of file Linear.hpp.

◆ _firstPage

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

Definition at line 45 of file Linear.hpp.


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