Loading...
Searching...
No Matches
by::allocator Class Referenceabstract

Abstract allocator interface for memory management. More...

#include <allocator.hpp>

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

Public Member Functions

 allocator (ncnt blksize=1)
 
virtual voidnew1 ()=0
 
virtual nbool del (void *used, ncnt sz)=0
 
ncnt getBlkSize () const
 
- Public Member Functions inherited from by::memoryHaver
virtual nbool has (const instance &it) const =0
 Checks if this memory manager "owns" or contains the given instance.
 
nbool has (const instance *it) const BY_SIDE_FUNC(has)
 
virtual ncnt len () const =0
 
virtual ncnt size () const =0
 
virtual nbool rel ()=0
 
nbool isFull () const
 
nbool isCapable () const
 

Additional Inherited Members

- Protected Member Functions inherited from by::memoryHaver
virtual void_get (nidx n)=0
 Internal method to get a pointer to memory at a specific index.
 

Detailed Description

Abstract allocator interface for memory management.

Inherits from memoryHaver, so can measure state and size of managed memory. Additionally can allocate and deallocate memory.

Remarks
void* and byte-only perspective Following memlite's concept of viewing all memory only as void* and bytes, new() and del() parameters only provide void*.

naming conventions

Allocation uses new1() (meaning "new one"), deallocation uses del(). This naming is frequently used not only in memlite but throughout the byeol project.

Member Function Documentation

◆ del()

virtual nbool by::allocator::del ( void * used,
ncnt sz )
pure virtual

Implemented in by::watcher.


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