Memory pool manager for efficient instance allocation 더 자세히 ...
#include <pool.hpp>
Public 멤버 함수 | |
| chunks * | get (const instance &it) |
| Gets chunks container managing memory for given instance | |
| chunks * | get (const instance *it) BY_SIDE_FUNC(get) |
| chunks * | get (nidx n) |
| Gets chunks at specified index | |
| ncnt | size () const override |
| ncnt | len () const override |
| nbool | rel () override |
| Releases all pool resources and destroys chunks | |
by::memoryHaver(으)로부터 상속된 Public 멤버 함수 | |
| 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) |
| nbool | isFull () const |
| nbool | isCapable () const |
Public 속성 | |
| const chunks *get(const instance &it) const BY_CONST_FUNC(get(it)) const chunks *get(const instance *it) const BY_CONST_FUNC(get(it)) const chunks *get(nidx n) const BY_CONST_FUNC(get(n)) using super nboo | has )(const instance &it) const override |
| Checks if instance is managed by this pool | |
Protected 멤버 함수 | |
| void * | _get (nidx n) override |
| Gets raw memory pointer at index | |
Memory pool manager for efficient instance allocation
The first class to handle memory allocation requests from external sources. Internally has an array of chunks, and since chunks has chunk, effectively manages all low-level memory-related classes.
A key point in creating a custom memory pool is increasing speed by listing same-size memory in one place. chunks has a block concept where each block can only allocate/ deallocate pre-specified sized memory. pool creates chunks with fixed block size. When external requests memory allocation of a specific size, pool finds chunks handling that block size. If none exist, creates lazily.
|
overrideprotectedvirtual |
Gets raw memory pointer at index
by::memoryHaver를 구현.
Gets chunks container managing memory for given instance
| chunks * by::pool::get | ( | nidx | n | ) |
Gets chunks at specified index
|
overridevirtual |
by::memoryHaver를 구현.
|
overridevirtual |
Releases all pool resources and destroys chunks
by::memoryHaver를 구현.
|
overridevirtual |
by::memoryHaver를 구현.
|
override |
Checks if instance is managed by this pool