27#ifndef TEMPTABLE_CHUNK_H
28#define TEMPTABLE_CHUNK_H
94 uint8_t *
block()
const;
105 uint8_t *
data()
const;
136 : m_offset(
reinterpret_cast<uint8_t *
>(data) -
148 *chunk_offset_ptr(m_offset) = new_offset;
Chunk is an abstraction with the purpose of representing a smallest logical memory-unit within the Bl...
Definition: chunk.h:67
static Chunk::metadata_type * chunk_offset_ptr(uint8_t *chunk)
Deduce a pointer to the offset of given Chunk.
Definition: chunk.h:163
size_t offset() const
Get the Chunk offset relative to the start of belonging Block.
Definition: chunk.h:153
static constexpr size_t METADATA_SIZE
Chunk metadata size.
Definition: chunk.h:73
Chunk(uint8_t *offset, size_t new_offset) noexcept
Constructor which Block will use to create a fresh Chunk object at the given memory-offset.
Definition: chunk.h:143
static uint8_t * chunk_data_ptr(uint8_t *chunk)
Deduce a pointer to the data payload of given Chunk.
Definition: chunk.h:167
uintptr_t metadata_type
Type that we will be using for storing metadata information.
Definition: chunk.h:70
uint8_t * data() const
Get the pointer to the data section which will be provided to the end-user.
Definition: chunk.h:157
static size_t size_hint(size_t n_bytes)
For given size, how much memory will be occupied by the Chunk.
Definition: chunk.h:159
uint8_t * m_offset
A pointer to the actual memory-location where Chunk is located at.
Definition: chunk.h:132
uint8_t * block() const
Deduce the memory-address of belonging Block.
Definition: chunk.h:151
Definition: allocator.h:44