/[zanavi_public1]/navit/navit/cache.h
ZANavi

Diff of /navit/navit/cache.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 30 Revision 31
1struct cache_entry; 1struct cache_entry
2{
3 int usage;
4 int size;
5 struct cache_entry_list *where;
6 struct cache_entry *next;
7 struct cache_entry *prev;
8 int id[0];
9};
10
11struct cache_entry_list
12{
13 struct cache_entry *first, *last;
14 int size;
15};
16
2struct cache; 17struct cache
18{
19 struct cache_entry_list t1, b1, t2, b2, *insert;
20 int size, id_size, entry_size;
21 int t1_target;
22 long misses;
23 long hits;
24 GHashTable *hash;
25// long long real_size_bytes;
26};
27
3/* prototypes */ 28/* prototypes */
4struct cache *cache_new(int id_size, int size); 29struct cache *cache_new(int id_size, int size);
5void *cache_entry_new(struct cache *cache, void *id, int size); 30void *cache_entry_new(struct cache *cache, void *id, int size);
6void cache_entry_destroy(struct cache *cache, void *data); 31void cache_entry_destroy(struct cache *cache, void *data);
7void *cache_lookup(struct cache *cache, void *id); 32void *cache_lookup(struct cache *cache, void *id);

Legend:
Removed from v.30  
changed lines
  Added in v.31

   
Visit the ZANavi Wiki