#include "squid.h"
#include "heap.h"
#include "MemObject.h"
#include "Store.h"
#include "store_heap_replacement.h"
#include "wordlist.h"
#include <queue>
Go to the source code of this file.
Classes | |
struct | HeapPolicyData |
struct | _HeapWalkData |
class | HeapPurgeData |
Typedefs | |
typedef struct _HeapWalkData | HeapWalkData |
Functions | |
static enum HeapPolicyData::heap_entry_type | heap_guessType (StoreEntry *entry, RemovalPolicyNode *node) |
static void | heap_add (RemovalPolicy *policy, StoreEntry *entry, RemovalPolicyNode *node) |
static void | heap_remove (RemovalPolicy *policy, StoreEntry *, RemovalPolicyNode *node) |
static void | heap_referenced (RemovalPolicy *policy, const StoreEntry *entry, RemovalPolicyNode *node) |
static const StoreEntry * | heap_walkNext (RemovalPolicyWalker *walker) |
static void | heap_walkDone (RemovalPolicyWalker *walker) |
static RemovalPolicyWalker * | heap_walkInit (RemovalPolicy *policy) |
static StoreEntry * | heap_purgeNext (RemovalPurgeWalker *walker) |
static void | heap_purgeDone (RemovalPurgeWalker *walker) |
static RemovalPurgeWalker * | heap_purgeInit (RemovalPolicy *policy, int max_scan) |
static void | heap_free (RemovalPolicy *policy) |
RemovalPolicy * | createRemovalPolicy_heap (wordlist *args) |
Variables | |
REMOVALPOLICYCREATE | createRemovalPolicy_heap |
static int | nr_heap_policies = 0 |
Typedef Documentation
◆ HeapWalkData
typedef struct _HeapWalkData HeapWalkData |
Definition at line 132 of file store_repl_heap.cc.
Function Documentation
◆ createRemovalPolicy_heap()
RemovalPolicy * createRemovalPolicy_heap | ( | wordlist * | args | ) |
Definition at line 283 of file store_repl_heap.cc.
References RemovalPolicy::_data, RemovalPolicy::_type, RemovalPolicy::Add, _heap::age, DBG_CRITICAL, DBG_IMPORTANT, debugs, RemovalPolicy::Dereferenced, RemovalPolicy::Free, heap_add(), heap_free(), heap_purgeInit(), heap_referenced(), heap_remove(), heap_walkInit(), HeapKeyGen_StoreEntry_GDSF(), HeapKeyGen_StoreEntry_LFUDA(), HeapKeyGen_StoreEntry_LRU(), wordlist::key, HeapPolicyData::keyfunc, new_heap(), wordlist::next, nr_heap_policies, HeapPolicyData::policy, RemovalPolicy::PurgeInit, RemovalPolicy::Referenced, RemovalPolicy::Remove, HeapPolicyData::theHeap, RemovalPolicy::WalkInit, and xcalloc().
◆ heap_add()
|
static |
Definition at line 81 of file store_repl_heap.cc.
References RemovalPolicy::_data, _heap::age, assert, HeapPolicyData::count, EBIT_TEST, ENTRY_SPECIAL, StoreEntry::flags, heap_guessType(), heap_insert(), HeapPolicyData::theHeap, and HeapPolicyData::type.
Referenced by createRemovalPolicy_heap().
◆ heap_free()
|
static |
Definition at line 269 of file store_repl_heap.cc.
References RemovalPolicy::_data, RemovalPolicy::_type, assert, HeapPolicyData::count, HeapPolicyData::nwalkers, and safe_free.
Referenced by createRemovalPolicy_heap().
◆ heap_guessType()
|
static |
Definition at line 49 of file store_repl_heap.cc.
References fatal(), StoreEntry::mem_obj, MemObject::repl, StoreEntry::repl, HeapPolicyData::TYPE_STORE_ENTRY, HeapPolicyData::TYPE_STORE_MEM, and HeapPolicyData::TYPE_UNKNOWN.
Referenced by heap_add().
◆ heap_purgeDone()
|
static |
Definition at line 224 of file store_repl_heap.cc.
References RemovalPurgeWalker::_data, RemovalPurgeWalker::_policy, assert, debugs, heap_insert(), HeapPurgeData::locked_entries, HeapPurgeData::min_age, and StoreEntry::unlock().
Referenced by heap_purgeInit().
◆ heap_purgeInit()
|
static |
Definition at line 252 of file store_repl_heap.cc.
References RemovalPolicy::_data, heap_purgeDone(), heap_purgeNext(), and HeapPolicyData::nwalkers.
Referenced by createRemovalPolicy_heap().
◆ heap_purgeNext()
|
static |
Definition at line 193 of file store_repl_heap.cc.
References RemovalPurgeWalker::_data, RemovalPurgeWalker::_policy, heap_empty(), heap_extractmin(), heap_peepminkey(), StoreEntry::lock(), StoreEntry::locked(), HeapPurgeData::locked_entries, and HeapPurgeData::min_age.
Referenced by heap_purgeInit().
◆ heap_referenced()
|
static |
Definition at line 118 of file store_repl_heap.cc.
References RemovalPolicy::_data, heap_update(), and HeapPolicyData::theHeap.
Referenced by createRemovalPolicy_heap().
◆ heap_remove()
|
static |
Definition at line 101 of file store_repl_heap.cc.
References RemovalPolicy::_data, HeapPolicyData::count, heap_delete(), and HeapPolicyData::theHeap.
Referenced by createRemovalPolicy_heap().
◆ heap_walkDone()
|
static |
Definition at line 155 of file store_repl_heap.cc.
References RemovalPolicy::_data, RemovalPolicyWalker::_data, RemovalPolicyWalker::_policy, RemovalPolicy::_type, assert, HeapPolicyData::nwalkers, and safe_free.
Referenced by heap_walkInit().
◆ heap_walkInit()
|
static |
Definition at line 167 of file store_repl_heap.cc.
References RemovalPolicy::_data, heap_walkDone(), heap_walkNext(), HeapPolicyData::nwalkers, and xcalloc().
Referenced by createRemovalPolicy_heap().
◆ heap_walkNext()
|
static |
Definition at line 139 of file store_repl_heap.cc.
References RemovalPolicyWalker::_data, RemovalPolicyWalker::_policy, _HeapWalkData::current, heap_nodes(), and heap_peep().
Referenced by heap_walkInit().
Variable Documentation
◆ createRemovalPolicy_heap
REMOVALPOLICYCREATE createRemovalPolicy_heap |
Definition at line 29 of file store_repl_heap.cc.
◆ nr_heap_policies
|
static |
Definition at line 31 of file store_repl_heap.cc.
Referenced by createRemovalPolicy_heap().