Abstract allocator interface for memory management. More...
#include <allocator.hpp>
Public Member Functions | |
| allocator (ncnt blksize=1) | |
| virtual void * | new1 ()=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. | |
Abstract allocator interface for memory management.
Inherits from memoryHaver, so can measure state and size of managed memory. Additionally can allocate and deallocate memory.
Allocation uses new1() (meaning "new one"), deallocation uses del(). This naming is frequently used not only in memlite but throughout the byeol project.
Implemented in by::watcher.