
Go to the source code of this file.
Classes | |
struct | LruPolicyData |
struct | _LruNode |
struct | _LruWalkData |
struct | _LruPurgeData |
Typedefs | |
typedef struct _LruNode | LruNode |
typedef struct _LruWalkData | LruWalkData |
typedef struct _LruPurgeData | LruPurgeData |
Functions | |
static enum LruPolicyData::heap_entry_type | repl_guessType (StoreEntry *entry, RemovalPolicyNode *node) |
static void | lru_add (RemovalPolicy *policy, StoreEntry *entry, RemovalPolicyNode *node) |
static void | lru_remove (RemovalPolicy *policy, StoreEntry *entry, RemovalPolicyNode *node) |
static void | lru_referenced (RemovalPolicy *policy, const StoreEntry *entry, RemovalPolicyNode *node) |
static const StoreEntry * | lru_walkNext (RemovalPolicyWalker *walker) |
static void | lru_walkDone (RemovalPolicyWalker *walker) |
static RemovalPolicyWalker * | lru_walkInit (RemovalPolicy *policy) |
static StoreEntry * | lru_purgeNext (RemovalPurgeWalker *walker) |
static void | lru_purgeDone (RemovalPurgeWalker *walker) |
static RemovalPurgeWalker * | lru_purgeInit (RemovalPolicy *policy, int max_scan) |
static void | lru_stats (RemovalPolicy *policy, StoreEntry *sentry) |
static void | lru_free (RemovalPolicy *policy) |
RemovalPolicy * | createRemovalPolicy_lru (wordlist *args) |
Variables | |
REMOVALPOLICYCREATE | createRemovalPolicy_lru |
static MemAllocator * | lru_node_pool = NULL |
static int | nr_lru_policies = 0 |
Typedef Documentation
◆ LruNode
Definition at line 51 of file store_repl_lru.cc.
◆ LruPurgeData
typedef struct _LruPurgeData LruPurgeData |
Definition at line 172 of file store_repl_lru.cc.
◆ LruWalkData
typedef struct _LruWalkData LruWalkData |
Definition at line 123 of file store_repl_lru.cc.
Function Documentation
◆ createRemovalPolicy_lru()
RemovalPolicy* createRemovalPolicy_lru | ( | wordlist * | args | ) |
Definition at line 302 of file store_repl_lru.cc.
References RemovalPolicy::_data, RemovalPolicy::_type, RemovalPolicy::Add, assert, RemovalPolicy::Dereferenced, RemovalPolicy::Free, lru_add(), lru_free(), lru_node_pool, lru_purgeInit(), lru_referenced(), lru_remove(), lru_stats(), lru_walkInit(), memPoolCreate, nr_lru_policies, LruPolicyData::policy, RemovalPolicy::PurgeInit, RemovalPolicy::Referenced, RemovalPolicy::Remove, MemAllocator::setChunkSize(), RemovalPolicy::Stats, RemovalPolicy::WalkInit, and xcalloc().
◆ lru_add()
|
static |
Definition at line 81 of file store_repl_lru.cc.
References RemovalPolicy::_data, MemAllocator::alloc(), assert, LruPolicyData::count, dlinkAddTail(), LruPolicyData::list, lru_node_pool, repl_guessType(), and LruPolicyData::type.
Referenced by createRemovalPolicy_lru().
◆ lru_free()
|
static |
Definition at line 288 of file store_repl_lru.cc.
References RemovalPolicy::_data, RemovalPolicy::_type, assert, LruPolicyData::count, LruPolicyData::nwalkers, and safe_free.
Referenced by createRemovalPolicy_lru().
◆ lru_purgeDone()
|
static |
Definition at line 238 of file store_repl_lru.cc.
References RemovalPolicy::_data, RemovalPurgeWalker::_data, RemovalPurgeWalker::_policy, RemovalPolicy::_type, assert, LruPolicyData::nwalkers, and safe_free.
Referenced by lru_purgeInit().
◆ lru_purgeInit()
|
static |
Definition at line 250 of file store_repl_lru.cc.
References RemovalPolicy::_data, dlink_list::head, LruPolicyData::list, lru_purgeDone(), lru_purgeNext(), LruPolicyData::nwalkers, and xcalloc().
Referenced by createRemovalPolicy_lru().
◆ lru_purgeNext()
|
static |
Definition at line 198 of file store_repl_lru.cc.
References RemovalPurgeWalker::_data, RemovalPurgeWalker::_policy, _LruPurgeData::current, dlink_node::data, dlinkAddTail(), dlinkDelete(), MemAllocator::freeOne(), RemovalPurgeWalker::locked, StoreEntry::locked(), lru_node_pool, RemovalPurgeWalker::max_scan, dlink_node::next, _LruNode::node, NULL, RemovalPurgeWalker::scanned, and _LruPurgeData::start.
Referenced by lru_purgeInit().
◆ lru_referenced()
|
static |
Definition at line 123 of file store_repl_lru.cc.
Referenced by createRemovalPolicy_lru().
◆ lru_remove()
|
static |
Definition at line 95 of file store_repl_lru.cc.
References RemovalPolicy::_data, assert, LruPolicyData::count, dlinkDelete(), MemAllocator::freeOne(), LruPolicyData::list, lru_node_pool, and NULL.
Referenced by createRemovalPolicy_lru().
◆ lru_stats()
|
static |
Definition at line 268 of file store_repl_lru.cc.
References RemovalPolicy::_data, dlink_list::head, StoreEntry::lastref, LruPolicyData::list, StoreEntry::locked(), hash_link::next, squid_curtime, and storeAppendPrintf().
Referenced by createRemovalPolicy_lru().
◆ lru_walkDone()
|
static |
Definition at line 160 of file store_repl_lru.cc.
References RemovalPolicy::_data, RemovalPolicyWalker::_data, RemovalPolicyWalker::_policy, RemovalPolicy::_type, assert, LruPolicyData::nwalkers, and safe_free.
◆ lru_walkInit()
|
static |
Definition at line 172 of file store_repl_lru.cc.
Referenced by createRemovalPolicy_lru().
◆ lru_walkNext()
|
static |
Definition at line 146 of file store_repl_lru.cc.
References RemovalPolicyWalker::_data, _LruWalkData::current, dlink_node::data, dlink_node::next, _LruNode::node, and NULL.
◆ repl_guessType()
|
static |
Definition at line 20 of file store_repl_lru.cc.
Referenced by lru_add().
Variable Documentation
◆ createRemovalPolicy_lru
REMOVALPOLICYCREATE createRemovalPolicy_lru |
Definition at line 20 of file store_repl_lru.cc.
Referenced by testRock::commonInit(), and testUfs::commonInit().
◆ lru_node_pool
|
static |
Definition at line 77 of file store_repl_lru.cc.
Referenced by createRemovalPolicy_lru(), lru_add(), lru_purgeNext(), and lru_remove().
◆ nr_lru_policies
|
static |
Definition at line 78 of file store_repl_lru.cc.
Referenced by createRemovalPolicy_lru().