mirror of
https://github.com/drasko/codezero.git
synced 2026-03-05 12:03:26 +01:00
Kernel updates since December 2009
This commit is contained in:
@@ -179,12 +179,13 @@ struct mem_cache *mem_cache_init(void *start,
|
||||
unsigned int diff = addr_aligned - addr;
|
||||
|
||||
BUG_ON(diff >= struct_size);
|
||||
if (diff)
|
||||
total--;
|
||||
cache_size -= diff;
|
||||
area_start = addr_aligned;
|
||||
}
|
||||
|
||||
/* Now recalculate total over cache bytes left */
|
||||
total = cache_size / struct_size;
|
||||
|
||||
link_init(&cache->list);
|
||||
cache->start = area_start;
|
||||
cache->end = area_start + cache_size;
|
||||
|
||||
Reference in New Issue
Block a user