MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / shrink

Method shrink

src/dsql/DsqlStatementCache.cpp:293–311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

291}
292
293void DsqlStatementCache::shrink()
294{
295#ifdef DSQL_STATEMENT_CACHE_DEBUG
296 printf("DsqlStatementCache::shrink() - cacheSize: %u, maxCacheSize: %u\n\n", cacheSize, maxCacheSize);
297#endif
298
299 while (cacheSize > maxCacheSize && !inactiveStatementList.isEmpty())
300 {
301 const auto& front = inactiveStatementList.front();
302 front.dsqlStatement->resetCacheKey();
303 map.remove(front.key);
304 cacheSize -= front.size;
305 inactiveStatementList.erase(inactiveStatementList.begin());
306 }
307
308#ifdef DSQL_STATEMENT_CACHE_DEBUG
309 dump();
310#endif
311}
312
313void DsqlStatementCache::ensureLockIsCreated(thread_db* tdbb)
314{

Callers 10

dsqlPassMethod · 0.45
resetMethod · 0.45
resetMethod · 0.45
clearBdbMethod · 0.45
lookupCollationMethod · 0.45
resetMethod · 0.45
processNextChunkMethod · 0.45
BLB_gen_bpbFunction · 0.45
mapUserMethod · 0.45
generateEquiJoinMethod · 0.45

Calls 7

resetCacheKeyMethod · 0.80
dumpFunction · 0.50
isEmptyMethod · 0.45
frontMethod · 0.45
removeMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected