[問題] 一個slab中的問題 煩請幫忙

看板LinuxDev作者 (suedeN  ￾   )時間17年前 (2007/11/04 18:07), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
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
文章代碼(AID): #17BPdTZn (LinuxDev)
文章代碼(AID): #17BPdTZn (LinuxDev)