Lugdunum
0.1.0
|
#include <Chunk.hpp>
Public Member Functions | |
Chunk (lug::System::Memory::Area::IArea *area) | |
Chunk (const Chunk &)=delete | |
Chunk (Chunk &&)=default | |
Chunk & | operator= (const Chunk &)=delete |
Chunk & | operator= (Chunk &&)=default |
~Chunk ()=default | |
void * | allocate (size_t size, size_t alignment, size_t offset) |
void | free (void *ptr) |
void | reset () |
size_t | getSize (void *ptr) const |
Private Attributes | |
lug::System::Memory::Area::IArea *const | _area |
FreeList | _freeList {ChunkSize} |
lug::System::Memory::Area::Page * | _currentPage {nullptr} |
lug::System::Memory::Area::Page * | _firstPage {nullptr} |
Static Private Attributes | |
static constexpr size_t | ChunkSize = (MaxAlignment <= 1 ? MaxSize : priv::ceil(static_cast<float>(MaxSize) / MaxAlignment) * MaxAlignment) |
Chunk::Chunk | ( | lug::System::Memory::Area::IArea * | area | ) |
|
delete |
|
default |
|
default |
|
delete |
|
default |
void Chunk::free | ( | void * | ptr | ) |
void Chunk::reset | ( | ) |
size_t Chunk::getSize | ( | void * | ptr | ) | const |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |