cache_t Struct Reference

Cache structure. More...

#include <cache.h>

Data Fields

int max
 For how many entries is space allocated?
int used
 How many entries are used.
int lru
 Which entry was the last accessed.
struct cache_entry_tentries [CACHE_DEFAULT+1]
 Cache entries, NULL terminated.

Detailed Description

Cache structure.

The more active an entry is, the more at the start of the array.

If a struct cache_t is allocated, its .max member should be set to the default CACHE_DEFAULT value.

For a struct cache_t* the function cch__new_cache() must be used.

Definition at line 52 of file cache.h.


Field Documentation

struct cache_entry_t* cache_t::entries[CACHE_DEFAULT+1] [read]

Which entry was the last accessed.

If the array of entries looked like this, with B accessed after C after D:

inline_dotgraph_12.dot

After setting a new entry A it looks like that:

inline_dotgraph_13.dot

*

Definition at line 78 of file cache.h.

Referenced by _st___string_from_bits(), cch__add(), cch__hash_add(), cch__set_active(), cm___absolute_path(), hlp___do_convert(), and ops__build_path().

For how many entries is space allocated?

Definition at line 54 of file cache.h.

Referenced by cch__add(), cch__set_active(), hlp__get_grname(), hlp__get_uname(), and ops__build_path().

How many entries are used.

Definition at line 56 of file cache.h.

Referenced by cch__add(), and cch__find().


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

Generated for fsvs by  doxygen 1.6.1