by::chunks Class Reference

Collection of memory chunks for scalable allocation. More...

#include <chunks.hpp>

Inheritance diagram for by::chunks:
by::allocator by::memoryHaver

Public Member Functions

 chunks (ncnt blkbyte=0)
 
chunkoperator[] (nidx n)
 
const chunkoperator[] (nidx n) const BY_CONST_FUNC(operator[](n))
 
chunkoperator[] (const instance &it)
 
const chunkoperator[] (const instance &it) const BY_CONST_FUNC(operator[](it))
 
chunkget (nidx n)
 
chunkget (const instance &it)
 
chunkget (const instance *it) BY_SIDE_FUNC(get)
 
const chunkget (nidx n) const BY_CONST_FUNC(get(n)) const chunk *get(const instance &it) const BY_CONST_FUNC(get(it)) const chunk *get(const instance *it) const BY_CONST_FUNC(get(it)) void *new 1() override
 
nbool del (void *pt, ncnt sz) override
 
virtual nbool resize (ncnt new1)
 
nbool has (const instance &it) const override
 
ncnt len () const override
 
ncnt size () const override
 
nbool rel () override
 
- Public Member Functions inherited from by::allocator
 allocator (ncnt blksize=1)
 
virtual void * new1 ()=0
 
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
 

Additional Inherited Members

Detailed Description

Collection of memory chunks for scalable allocation.

Manages multiple memory chunks to provide scalable memory allocation. Automatically manages chunk creation and selection for optimal performance.

Member Function Documentation

◆ del()

nbool by::chunks::del ( void *  pt,
ncnt  sz 
)
overridevirtual

Implements by::allocator.

◆ has()

nbool by::chunks::has ( const instance it) const
overridevirtual

Implements by::memoryHaver.

◆ len()

ncnt by::chunks::len ( ) const
overridevirtual

Implements by::memoryHaver.

◆ rel()

nbool by::chunks::rel ( )
overridevirtual

Implements by::memoryHaver.

◆ resize()

virtual nbool by::chunks::resize ( ncnt  new1)
virtual
Remarks
chunk can resize its data. but can't persist whole memory allocated before, it's a kind of memory flashing and can't give a way for accessing it. at outside, ptr for them should be daggled.

◆ size()

ncnt by::chunks::size ( ) const
overridevirtual

Implements by::memoryHaver.


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