kmalloc_slab mgt field unused

James Cook falsifian at falsifian.org
Wed May 19 04:25:25 PDT 2021


On Tue, May 18, 2021 at 02:54:45PM -0900, Matthew Dillon wrote:
> Yah, originally I was going to have a back-pointer from the slab but it
> turned out to be unnecessary.  I'll change it to 'void *unused01' so the
> structure size doesn't change.  And I might as well keep the bmap[] field
> 16-byte aligned.
> 
> -Matt

I'm curious: what's the point of keeping the structure size the same?
Is it just so that alignment doesn't get messed up in larger structures
that contain a kmalloc_slab field?

-- 
James



More information about the Kernel mailing list