看板 LinuxDev 關於我們 聯絡資訊
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