important bugfix

This commit is contained in:
Robin Müller 2020-10-15 00:43:23 +02:00
parent d149836612
commit 64bed475fe

View File

@ -3,23 +3,23 @@
#include <cstring> #include <cstring>
LocalPool::LocalPool(object_id_t setObjectId, const LocalPoolConfig poolConfig, LocalPool::LocalPool(object_id_t setObjectId, const LocalPoolConfig poolConfig,
bool registered, bool spillsToHigherPools): bool registered, bool spillsToHigherPools):
SystemObject(setObjectId), NUMBER_OF_POOLS(poolConfig.size()) { SystemObject(setObjectId, registered),
uint16_t index = 0; NUMBER_OF_POOLS(poolConfig.size()),
for (const auto& currentPoolConfig: poolConfig) { spillsToHigherPools(spillsToHigherPools) {
this->elementSizes[index] = currentPoolConfig.first; uint16_t index = 0;
this->numberOfElements[index] = currentPoolConfig.second; for (const auto& currentPoolConfig: poolConfig) {
store[index] = std::vector<uint8_t>( this->elementSizes[index] = currentPoolConfig.first;
numberOfElements[index] * elementSizes[index]); this->numberOfElements[index] = currentPoolConfig.second;
sizeLists[index] = std::vector<size_type>(numberOfElements[index]); store[index] = std::vector<uint8_t>(
//TODO checkme numberOfElements[index] * elementSizes[index]);
for(auto& size: sizeLists[index]) { sizeLists[index] = std::vector<size_type>(numberOfElements[index]);
size = STORAGE_FREE; //TODO checkme
} for(auto& size: sizeLists[index]) {
// std::memset(sizeLists[index], 0xff, size = STORAGE_FREE;
// numberOfElements[index] * sizeof(size_type)); }
index++; index++;
} }
} }
LocalPool::~LocalPool(void) {} LocalPool::~LocalPool(void) {}