로딩중...
검색중...
일치하는것 없음
by::pool 클래스 참조

Memory pool manager for efficient instance allocation 더 자세히 ...

#include <pool.hpp>

by::pool에 대한 상속 다이어그램 :
by::memoryHaver

Public 멤버 함수

chunksget (const instance &it)
 Gets chunks container managing memory for given instance
 
chunksget (const instance *it) BY_SIDE_FUNC(get)
 
chunksget (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.

pool lazily has chunks per allocatable size

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.

멤버 함수 문서화

◆ _get()

void * by::pool::_get ( nidx n)
overrideprotectedvirtual

Gets raw memory pointer at index

반환값
Void pointer to memory at index n
주의
Internal accessor for memoryHaver interface

by::memoryHaver를 구현.

◆ get() [1/2]

chunks * by::pool::get ( const instance & it)

Gets chunks container managing memory for given instance

반환값
Pointer to chunks managing this instance's memory, or nullptr if not found
주의
Finds chunks by instance size to locate appropriate memory block

◆ get() [2/2]

chunks * by::pool::get ( nidx n)

Gets chunks at specified index

반환값
Pointer to chunks at index n, or nullptr if out of bounds

◆ len()

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

by::memoryHaver를 구현.

◆ rel()

nbool by::pool::rel ( )
overridevirtual

Releases all pool resources and destroys chunks

반환값
true on success, false on failure
주의
Destroys all chunks and frees allocated memory

by::memoryHaver를 구현.

◆ size()

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

by::memoryHaver를 구현.

멤버 데이터 문서화

◆ has

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 by::pool::has) (const instance &it) const override
override

Checks if instance is managed by this pool

반환값
true if instance allocated from this pool, false otherwise

이 클래스에 대한 문서화 페이지는 다음의 파일로부터 생성되었습니다.: