Woolz Image Processing  Version 1.8.3
_AlcLRUCache Struct Reference

A least recent use removal cache allowing rank and random access to it's entries. Rank access is via a doubly linked list (using rankPrv and rankNxt), while random access is via hash table (using the item's key and hashNxt). The cache will unlink items as required to maintain the set maximum number of entries and maximum total entry size. Typedef: AlcLRUCache. More...

Data Fields

unsigned int numItem
 
unsigned int maxItem
 
size_t curSz
 
size_t maxSz
 
unsigned int hashTblSz
 
unsigned int itemBlkSz
 
AlcLRUCKeyFn keyFn
 
AlcLRUCCmpFn cmpFn
 
AlcLRUCUnlinkFn unlinkFn
 
struct _AlcBlockStackfreeStack
 
struct _AlcLRUCItemfreeList
 
struct _AlcLRUCItemrankHead
 
struct _AlcLRUCItemrankTail
 
struct _AlcLRUCItem ** hashTbl
 

Detailed Description

A least recent use removal cache allowing rank and random access to it's entries. Rank access is via a doubly linked list (using rankPrv and rankNxt), while random access is via hash table (using the item's key and hashNxt). The cache will unlink items as required to maintain the set maximum number of entries and maximum total entry size. Typedef: AlcLRUCache.

Field Documentation

◆ numItem

unsigned int _AlcLRUCache::numItem

Current number of items in the cache.

Referenced by AlcLRUCacheFacts().

◆ maxItem

unsigned int _AlcLRUCache::maxItem

Maximum number of items in the cache.

Referenced by AlcLRUCacheFacts(), and AlcLRUCacheNew().

◆ curSz

size_t _AlcLRUCache::curSz

Current total cache size.

Referenced by AlcLRUCacheFacts(), and AlcLRUCacheMaxSz().

◆ maxSz

size_t _AlcLRUCache::maxSz

Maximum total cache size.

Referenced by AlcLRUCacheFacts(), AlcLRUCacheNew(), AlcLRUCEntryAdd(), and AlcLRUCEntryAddWithKey().

◆ hashTblSz

unsigned int _AlcLRUCache::hashTblSz

Size of the hash table.

Referenced by AlcLRUCacheFacts(), and AlcLRUCacheNew().

◆ itemBlkSz

unsigned int _AlcLRUCache::itemBlkSz

Number of items to allocate in a block.

Referenced by AlcLRUCacheFacts(), and AlcLRUCacheNew().

◆ keyFn

AlcLRUCKeyFn _AlcLRUCache::keyFn

Function called to compute a numeric key for an entry.

Referenced by AlcLRUCacheFacts(), AlcLRUCacheNew(), AlcLRUCEntryAdd(), AlcLRUCEntryGet(), and AlcLRUCEntryRemove().

◆ cmpFn

AlcLRUCCmpFn _AlcLRUCache::cmpFn

Function called to compare two entries, returning zero only iff the entries match.

Referenced by AlcLRUCacheFacts(), and AlcLRUCacheNew().

◆ unlinkFn

AlcLRUCUnlinkFn _AlcLRUCache::unlinkFn

Function called before unlinking and removing an item from the cache.

Referenced by AlcLRUCacheFacts(), AlcLRUCacheNew(), AlcLRUCEntryRemoveAll(), and AlcLRUCEntryRemoveWithKey().

◆ freeStack

struct _AlcBlockStack* _AlcLRUCache::freeStack

Stack of blocks of items.

Referenced by AlcLRUCacheFacts(), and AlcLRUCacheFree().

◆ freeList

struct _AlcLRUCItem* _AlcLRUCache::freeList

Head of the linked list of free cache items available for use.

Referenced by AlcLRUCacheFacts().

◆ rankHead

struct _AlcLRUCItem* _AlcLRUCache::rankHead

Head of the linked list of cache items in priority rank order. This is maintained with the most recently used item at the head and the least recently used item at the tail.

Referenced by AlcLRUCacheFacts(), and AlcLRUCEntryRemoveAll().

◆ rankTail

struct _AlcLRUCItem* _AlcLRUCache::rankTail

Tail of the linked list of cache items in rank order.

Referenced by AlcLRUCacheFacts(), and AlcLRUCacheMaxSz().

◆ hashTbl

struct _AlcLRUCItem** _AlcLRUCache::hashTbl

Hash table of cache items.

Referenced by AlcLRUCacheFacts(), AlcLRUCacheFree(), and AlcLRUCacheNew().


The documentation for this struct was generated from the following file: