84 std::cout <<
"Deleting cached module...\n";
107 std::cout <<
"Cache initialized\n";
126 if (!
cached)
return nullptr;
150 std::map<std::string, CachedModule*>::iterator
itr;
169 std::cout <<
"Deleting the least recent module: " <<
foundItr->first <<
" timestamp: " <<
lTimestamp <<
"\n";
183 std::map<std::string, CachedModule*>::iterator
itr;
189 std::cout <<
"[" <<
i++ <<
"] Deleting cached module: " <<
itr->first <<
"\n";
197 std::cout <<
"Cache deleted. Total: " <<
i <<
" modules.\n";
BYTE * getMappedCached(const std::string &modName, size_t &mappedSize)
bool prepareCacheSpace(bool force_free=false)
BYTE * loadCached(LPSTR szModName, size_t &original_size)
bool _deleteLeastRecent()
std::map< std::string, CachedModule * > cachedModules
the list of all the cached modules
static const size_t MaxCachedModules
how many modules can be stored in the cache at the time
static const size_t MinUsageCntr
how many times loading of the module must be requested before the module is added to cache
std::map< std::string, size_t > usageBeforeCounter
how many times loading of the same module was requested before it was cached
size_t fill_iat(BYTE *vBuf, size_t vBufSize, IN const peconv::ExportsMapper *exportsMap, IN OUT IATBlock &iat, IN ThunkFoundCallback *callback)
CachedModule(BYTE *_moduleData, size_t _moduleSize)
BYTE * mapFromCached(size_t &mappedSize) const
MutexLocker(Mutex &_mutex)