#include <OnixS/CME/MDH/MemoryPoolSettings.h>
Public Member Functions | |
| MemoryPoolSettings () noexcept=default | |
| MemoryPoolSettings (std::size_t blockIncrease, std::size_t increaseQty, std::size_t chunkSize, std::size_t chunkScaling) | |
| std::size_t | blockIncrease () const noexcept |
| void | blockIncrease (std::size_t increase) |
| std::size_t | increaseQty () const noexcept |
| void | increaseQty (std::size_t qty) |
| std::size_t | chunkSize () const noexcept |
| void | chunkSize (std::size_t size) |
| std::size_t | chunkScaling () const noexcept |
| void | chunkScaling (std::size_t factor) |
These settings control allocation granularity, the range of block sizes cached by the pool, and how chunks of equally sized blocks grow as demand increases.
Definition at line 36 of file MemoryPoolSettings.h.
|
defaultnoexcept |
Creates settings with their default values.
| MemoryPoolSettings | ( | std::size_t | blockIncrease, |
| std::size_t | increaseQty, | ||
| std::size_t | chunkSize, | ||
| std::size_t | chunkScaling ) |
Creates settings with the specified allocation and chunk-growth policy.
| blockIncrease | Difference in capacity between adjacent cached block-size classes. |
| increaseQty | Number of cached block-size classes. |
| chunkSize | Initial number of blocks allocated per chunk. |
| chunkScaling | Factor by which successive chunks grow. |
| std::out_of_range | If any parameter is zero. |
|
inlinenoexcept |
Returns the allocation granularity for memory blocks.
Definition at line 56 of file MemoryPoolSettings.h.
| void blockIncrease | ( | std::size_t | increase | ) |
Sets the allocation granularity for memory blocks.
| increase | Value by which cached memory-block sizes must be divisible. |
| std::out_of_range | If increase is zero. |
|
inlinenoexcept |
Returns the factor used to grow successive chunks.
Definition at line 106 of file MemoryPoolSettings.h.
| void chunkScaling | ( | std::size_t | factor | ) |
Sets the factor used to grow successive chunks.
| factor | Multiplier applied when the memory pool allocates another chunk. |
| std::out_of_range | If factor is zero. |
|
inlinenoexcept |
Returns the initial number of equally sized blocks allocated per chunk.
Definition at line 90 of file MemoryPoolSettings.h.
| void chunkSize | ( | std::size_t | size | ) |
Sets the initial number of equally sized blocks allocated per chunk.
Allocating blocks in chunks reduces the number of underlying memory allocations.
| size | Initial number of blocks in a newly allocated chunk. |
| std::out_of_range | If size is zero. |
|
inlinenoexcept |
Returns the number of block-size increments cached by the memory pool.
Requests no larger than blockIncrease() * increaseQty() can use cached blocks; larger requests are allocated without caching.
Definition at line 73 of file MemoryPoolSettings.h.
| void increaseQty | ( | std::size_t | qty | ) |
Sets the number of block-size increments cached by the memory pool.
Requests no larger than blockIncrease() * increaseQty() can use cached blocks; larger requests are allocated without caching.
| qty | Number of cached block-size increments. |
| std::out_of_range | If qty is zero. |