- 代碼: 選擇全部
struct array_cache
{
unsigned int avail;
.
.
};
struct kmem_cache
{
struct array_cache *array[NR_CPUS];
};
void *objp;
struct array_cache *ac;
struct keme_cache * cache_p;
ac = cache_p->array[0];
objp = ((void **)(ac+1))[--ac->avail];
Because the local cache array is stored right after the
ac descriptor ==>是這句話讓ac+1的嗎
還有就是
objp = ((void **)(ac+1))[--ac->avail];
這句看不懂....
有人能夠解釋嗎...
感恩各位了