search for: cache_struct

Displaying 1 result from an estimated 1 matches for "cache_struct".

2009 May 24
0
malloc() in the core
...ly want the cache system to handle multiple block sizes (first of all, because hard disks are going to be changing from 512 to 4K sectors over the next several years, and second because filesystems like ext2 have metadata which is more logically cached on the filesystem block level): static struct cache_struct cache_head, cache[MAX_CACHE_ENTRIES]; static uint8_t cache_data[65536]; static int cache_block_size; static int cache_entries; void cache_init(int block_size) { struct cache_struct *prev, *cur; uint8_t *data = cache_data; int i; cache_block_size = block_size; cache_entries = si...