35 reason +=
"Non-zero value is expected for '";
36 reason += parameter ? parameter :
"<unknown>";
37 reason +=
"' parameter. ";
39 throw std::out_of_range(reason);
60 : blockIncrease_(other.blockIncrease_)
61 , increaseQty_(other.increaseQty_)
62 , chunkSize_(other.chunkSize_)
63 , chunkScaling_(other.chunkScaling_)
76 return blockIncrease_;
85 const Char*
const name =
"BlockIncrease";
89 blockIncrease_ = increase;
120 const Char*
const name =
"IncreaseQty";
153 const Char*
const name =
"ChunkSize";
171 return chunkScaling_;
180 const Char*
const name =
"ChunkScaling";
184 chunkScaling_ = factor;
195 blockIncrease_ = other.blockIncrease_;
197 increaseQty_ = other.increaseQty_;
199 chunkSize_ = other.chunkSize_;
201 chunkScaling_ = other.chunkScaling_;
207 size_t blockIncrease_;
213 size_t chunkScaling_;
225 toStr(str, settings);
size_t blockIncrease() const
Memory block increase value.
std::string toStr(const MemoryPoolSettings &settings)
Serializes memory pool settings into a string.
#define ONIXS_CMEMDH_LTWT
void blockIncrease(size_t increase)
Updates memory block increase value.
char Char
Character type alias.
MemoryPoolSettings & operator=(const MemoryPoolSettings &other)
Initializes as a copy.
MemoryPoolSettings()
Initializes parameters with default values.
void chunkScaling(size_t factor)
Defines chunk scale factor.
size_t increaseQty() const
Limits number of increases memory pool does.
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
void chunkSize(size_t size)
Number of blocks per chunk.
~MemoryPoolSettings()
Finalizes the instance.
#define ONIXS_CMEMDH_EXPORTED
size_t chunkSize() const
Number of blocks per chunk.
size_t chunkScaling() const
Defines chunk scale factor.
void throwZeroParameter(const Char *parameter)
Raises exception on zero parameter value.
void increaseQty(size_t qty)
Limits number of increases memory pool does.
MemoryPoolSettings(const MemoryPoolSettings &other)
Initializes as a copy.
#define ONIXS_CMEMDH_NAMESPACE_END