version 4.4.1
PIVector and PIDeque now growth to 64 MiB with PoT, then increments size by 64 MiB in case of large containers it significantly save memory
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
const size_t minAlloc = 64;
|
||||
const size_t maxPoTAlloc = 4_MiB;
|
||||
const size_t maxPoTAlloc = 64_MiB;
|
||||
|
||||
|
||||
size_t _PIContainerConstantsBase::calcMinCountPoT(size_t szof) {
|
||||
@@ -39,10 +39,12 @@ size_t _PIContainerConstantsBase::calcMinCountPoT(size_t szof) {
|
||||
|
||||
|
||||
size_t _PIContainerConstantsBase::calcMaxCountForPoT(size_t szof) {
|
||||
// printf("calcMaxCountForPoT sizeof = %d, size = %d\n", szof, maxPoTAlloc / szof);
|
||||
return maxPoTAlloc / szof;
|
||||
}
|
||||
|
||||
|
||||
size_t _PIContainerConstantsBase::calcStepAfterPoT(size_t szof) {
|
||||
// printf("calcStepAfterPoT sizeof = %d, size = %d\n", szof, calcMaxCountForPoT(szof));
|
||||
return calcMaxCountForPoT(szof);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user