Woolz Image Processing  Version 1.7.5
_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

unsigned int _AlcLRUCache::numItem
unsigned int _AlcLRUCache::maxItem

Maximum number of items in the cache.

Referenced by AlcLRUCacheFacts(), and AlcLRUCacheNew().

size_t _AlcLRUCache::maxSz
unsigned int _AlcLRUCache::hashTblSz
unsigned int _AlcLRUCache::itemBlkSz

Number of items to allocate in a block.

Referenced by AlcLRUCacheFacts(), and AlcLRUCacheNew().

AlcLRUCKeyFn _AlcLRUCache::keyFn

Function called to compute a numeric key for an entry.

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

AlcLRUCCmpFn _AlcLRUCache::cmpFn

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

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

AlcLRUCUnlinkFn _AlcLRUCache::unlinkFn

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

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

struct _AlcBlockStack* _AlcLRUCache::freeStack

Stack of blocks of items.

Referenced by AlcLRUCacheFacts(), and AlcLRUCacheFree().

struct _AlcLRUCItem* _AlcLRUCache::freeList

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

Referenced by AlcLRUCacheFacts().

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().

struct _AlcLRUCItem* _AlcLRUCache::rankTail

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

Referenced by AlcLRUCacheFacts(), and AlcLRUCacheMaxSz().

struct _AlcLRUCItem** _AlcLRUCache::hashTbl

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