[問題] 一個slab中的問題 煩請幫忙
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];
這句看不懂....
有人能夠解釋嗎...
煩請各位幫忙
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.117.176.182
LinuxDev 近期熱門文章
PTT數位生活區 即時熱門文章
21
65