Memory chunk for block-based allocation. More...
#include <chunk.hpp>
Public Member Functions | |
| chunk (ncnt blockSz=1, ncnt sz=MIN_SZ) | |
| void * | operator[] (nidx n) |
| const void * | operator[] (nidx n) const BY_CONST_FUNC(operator[](n)) |
| void * | get (nidx n) |
| void * | new1 () override |
| nbool | del (void *used, ncnt) override |
| ncnt | len () const override |
| ncnt | size () const override |
| nbool | rel () override |
| nbool | has (const instance &it) const override |
Public Member Functions inherited from by::allocator | |
| allocator (ncnt blksize=1) | |
| ncnt | getBlkSize () const |
Public Member Functions inherited from by::memoryHaver | |
| nbool | has (const instance *it) const BY_SIDE_FUNC(has) |
| nbool | isFull () const |
| nbool | isCapable () const |
Static Public Attributes | |
| static constexpr ncnt | MIN_SZ = 20 |
Protected Member Functions | |
| void * | _get (nidx n) override |
| nuchar * | _getHeap () |
| const nuchar * | _getHeap () const BY_CONST_FUNC(_getHeap()) nbool _resize(ncnt new Sz) |
Friends | |
| class | watcher |
Memory chunk for block-based allocation.
Manages a contiguous block of memory divided into fixed-size blocks. Provides efficient allocation and deallocation within the chunk.
|
overrideprotectedvirtual |
Implements by::memoryHaver.
|
overridevirtual |
Implements by::allocator.
|
overridevirtual |
Implements by::memoryHaver.
|
overridevirtual |
Implements by::memoryHaver.
|
overridevirtual |
Implements by::allocator.
|
overridevirtual |
Implements by::memoryHaver.
|
overridevirtual |
Implements by::memoryHaver.