free a slab object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, all
     In the function call chain kmem_cache_free()->cache_flusharray()->free_block()->slab_put_obj(), there are codes like the following which I can not understand:
        unsigned int objnr = obj_to_index(cachep, slabp, objp);
        slab_bufctl(slabp)[objnr] = slabp->free;
        slabp->free = objnr;
        slabp->inuse--;

and  slab_bufctl(slabp) is (kmem_bufctl_t *)(slabp + 1).
Since slabp is a pointer to struct slab, then what does slabp + 1 point to? the next slab? what is the meaning of slab_bufctl(slabp)[objnr] ?
Wish I describe my question clearly!
Thanks!

--
National Research Center for Intelligent Computing Systems
Institute of Computing Technology, Chinese Academy of Sciences

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux