(experimental) LRU cache turned off, safe delete

This commit is contained in:
Dennis Luxen 2011-07-12 17:12:30 +00:00
parent 307c9ae9c5
commit 96f5c1c735
3 changed files with 11 additions and 10 deletions

View File

@ -557,10 +557,10 @@ private:
cellMap.insert(std::make_pair(fileIndex, cellIndex));
}
}
if(cellCache.exists(startIndexInFile)) {
cellCache.fetch(startIndexInFile, cellIndex);
} else {
{
// if(cellCache.exists(startIndexInFile)) {
// cellCache.fetch(startIndexInFile, cellIndex);
// } else {
std::ifstream localStream(iif, std::ios::in | std::ios::binary);
localStream.seekg(startIndexInFile);
localStream.read((char*) &cellIndex[0], 32*32*sizeof(unsigned));
@ -569,10 +569,10 @@ private:
if(cellIndex[cellMap.find(fileIndex)->second] == UINT_MAX) {
return;
}
#pragma omp critical
{
cellCache.insert(startIndexInFile, cellIndex);
}
//#pragma omp critical
// {
// cellCache.insert(startIndexInFile, cellIndex);
// }
}
const unsigned position = cellIndex[cellMap.find(fileIndex)->second] + 32*32*sizeof(unsigned) ;

View File

@ -58,7 +58,7 @@ public:
}
~RoutePlugin() {
delete sEngine;
DELETE(sEngine);
}
std::string GetDescriptor() { return pluginDescriptorString; }

View File

@ -32,6 +32,7 @@ or see http://www.gnu.org/licenses/agpl.txt.
#include "../DataStructures/HashTable.h"
#include "../Plugins/BasePlugin.h"
#include "../Plugins/RouteParameters.h"
#include "../typedefs.h"
namespace http {
@ -43,7 +44,7 @@ public:
for(unsigned i = 0; i < _pluginVector.size(); i++) {
BasePlugin * tempPointer = _pluginVector[i];
delete tempPointer;
DELETE( tempPointer );
}
}