On Thu, Sep 24, 2020 at 08:08:12AM +0000, Van Leeuwen, Pascal wrote: > > The fact that kmalloc uses it does _not_ rule out the fact that it wastes > memory ... > And as long as you use kmalloc for fairly large data structures, it shouldn't > matter much. > But here I need a couple of fairly small buffers.
Those small buffers are embedded in a structure that's already aligned by kmalloc. So just put your buffers at the start of the struct to minimise holes. Cheers, -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt