1
0
forked from fsfw/fsfw

improved naming convention

This commit is contained in:
2021-01-18 20:03:03 +01:00
parent 6e6e1304bb
commit 74def820c6
3 changed files with 33 additions and 16 deletions

View File

@ -348,16 +348,20 @@ void LocalPool::getFillCount(uint8_t *buffer, uint8_t *bytesWritten) {
}
void LocalPool::clearPage(max_pools_t pageIndex) {
if(pageIndex >= NUMBER_OF_POOLS) {
void LocalPool::clearPool(max_pools_t poolIndex) {
if(poolIndex >= NUMBER_OF_POOLS) {
return;
}
// Mark the storage as free
for(auto& size: sizeLists[pageIndex]) {
for(auto& size: sizeLists[poolIndex]) {
size = STORAGE_FREE;
}
// Set all the page content to 0.
std::memset(store[pageIndex].data(), 0, elementSizes[pageIndex]);
std::memset(store[poolIndex].data(), 0, elementSizes[poolIndex]);
}
LocalPool::max_pools_t LocalPool::getNumberOfPools() const {
return NUMBER_OF_POOLS;
}