(experimental) LRU cache turned off, safe delete
This commit is contained in:
parent
307c9ae9c5
commit
96f5c1c735
@ -557,10 +557,10 @@ private:
|
|||||||
cellMap.insert(std::make_pair(fileIndex, cellIndex));
|
cellMap.insert(std::make_pair(fileIndex, cellIndex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
{
|
||||||
if(cellCache.exists(startIndexInFile)) {
|
// if(cellCache.exists(startIndexInFile)) {
|
||||||
cellCache.fetch(startIndexInFile, cellIndex);
|
// cellCache.fetch(startIndexInFile, cellIndex);
|
||||||
} else {
|
// } else {
|
||||||
std::ifstream localStream(iif, std::ios::in | std::ios::binary);
|
std::ifstream localStream(iif, std::ios::in | std::ios::binary);
|
||||||
localStream.seekg(startIndexInFile);
|
localStream.seekg(startIndexInFile);
|
||||||
localStream.read((char*) &cellIndex[0], 32*32*sizeof(unsigned));
|
localStream.read((char*) &cellIndex[0], 32*32*sizeof(unsigned));
|
||||||
@ -569,10 +569,10 @@ private:
|
|||||||
if(cellIndex[cellMap.find(fileIndex)->second] == UINT_MAX) {
|
if(cellIndex[cellMap.find(fileIndex)->second] == UINT_MAX) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#pragma omp critical
|
//#pragma omp critical
|
||||||
{
|
// {
|
||||||
cellCache.insert(startIndexInFile, cellIndex);
|
// cellCache.insert(startIndexInFile, cellIndex);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
const unsigned position = cellIndex[cellMap.find(fileIndex)->second] + 32*32*sizeof(unsigned) ;
|
const unsigned position = cellIndex[cellMap.find(fileIndex)->second] + 32*32*sizeof(unsigned) ;
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
~RoutePlugin() {
|
~RoutePlugin() {
|
||||||
delete sEngine;
|
DELETE(sEngine);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string GetDescriptor() { return pluginDescriptorString; }
|
std::string GetDescriptor() { return pluginDescriptorString; }
|
||||||
|
@ -32,6 +32,7 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
|||||||
#include "../DataStructures/HashTable.h"
|
#include "../DataStructures/HashTable.h"
|
||||||
#include "../Plugins/BasePlugin.h"
|
#include "../Plugins/BasePlugin.h"
|
||||||
#include "../Plugins/RouteParameters.h"
|
#include "../Plugins/RouteParameters.h"
|
||||||
|
#include "../typedefs.h"
|
||||||
|
|
||||||
namespace http {
|
namespace http {
|
||||||
|
|
||||||
@ -43,7 +44,7 @@ public:
|
|||||||
|
|
||||||
for(unsigned i = 0; i < _pluginVector.size(); i++) {
|
for(unsigned i = 0; i < _pluginVector.size(); i++) {
|
||||||
BasePlugin * tempPointer = _pluginVector[i];
|
BasePlugin * tempPointer = _pluginVector[i];
|
||||||
delete tempPointer;
|
DELETE( tempPointer );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user