Woolz Image Processing
Version 1.8.3
|
A cache allowing rank and key access to it's entries. The cache is maintained using a maximum number of items and maximum total entry size. More...
Functions | |
AlcLRUCache * | AlcLRUCacheNew (unsigned int maxItem, size_t maxSz, AlcLRUCKeyFn keyFn, AlcLRUCCmpFn cmpFn, AlcLRUCUnlinkFn unlinkFn, AlcErrno *dstErr) |
Allocates a new least recent use removal cache. More... | |
void | AlcLRUCacheFree (AlcLRUCache *cache, int unlink) |
Frees a least recent use removal cache. More... | |
void * | AlcLRUCEntryGet (AlcLRUCache *cache, void *entry) |
Given a cache entry (with sufficient data in the entry for the cache key generation function) this function attempts to find a matching entry in the cache. The partical entry could for example contain only an identification string if that is all that is required for key generation and entry comparison. If the entry exists in the cache then it become the most recently used entry. See AlcLRUCEntryGetWithKey(). More... | |
void * | AlcLRUCEntryGetWithKey (AlcLRUCache *cache, unsigned int key, void *entry) |
Given a cache entry with sufficient data in the entry for the cache key generation function, this function attempts to find the matching cache entry. The partical entry could for example contain only an identification string if that is all that is required for entry comparison. If The given key is used to search the cache for entries with the same key. These are then checked using the cache entry comparison function. If the entry exists in the cache then it become the most recently used entry. More... | |
AlcLRUCItem * | AlcLRUCEntryAdd (AlcLRUCache *cache, size_t entrySz, void *entry, int *dstNewFlg) |
Attempts to add the given entry to the cache. If the entry already exists in the cache then it become the most recently used entry, but is not modified. More... | |
AlcLRUCItem * | AlcLRUCEntryAddWithKey (AlcLRUCache *cache, size_t entrySz, void *entry, unsigned int key, int *dstNewFlg) |
Attempts to add the given entry to the cache. If the entry already exists in the cache then it become the most recently used entry. More... | |
void | AlcLRUCEntryRemove (AlcLRUCache *cache, void *entry) |
Removes the matching cache entry from the queue. See AlcLRUCEntryGet() for the entry use. More... | |
void | AlcLRUCEntryRemoveWithKey (AlcLRUCache *cache, unsigned int key, void *entry) |
Removes the matching cache entry from the queue. See AlcLRUCEntryGetWithKey() for the entry use. More... | |
void | AlcLRUCEntryRemoveAll (AlcLRUCache *cache) |
Removes all cache entries. More... | |
unsigned int | AlcLRUCKeyGetNHashItem (AlcLRUCache *cache, unsigned int key) |
Returns the number of items in the hash bin corresponding to the given item key value. This is probably only useful for debug and tuning. More... | |
void | AlcLRUCacheMaxSz (AlcLRUCache *cache, size_t newMaxSz) |
Set a new maximum total cache entry size. More... | |
void | AlcLRUCacheFacts (AlcLRUCache *cache, FILE *fP) |
Prints a dump of the current cache status to a file. This is only intended for debug and tuning. More... | |
AlcLRUCItem * | AlcLRUCItemFind (AlcLRUCache *cache, unsigned int key, void *entry) |
Finds the cache item which matches the given entry. More... | |
A cache allowing rank and key access to it's entries. The cache is maintained using a maximum number of items and maximum total entry size.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.