On Tue, 28 Jan 2014 17:00:13 -0800, m silverstri said:
> Thanks. How big should be my  slab cache and how to allocate from that?

kmem_cache_alloc() and kmem_cache_free() are your friends.

> And to declare a struct ' __attribute__(aligned(32))'', does that mean
> I do that for every file in my struct?

I'm guessing you mean "for every field in my struct".  And the answer is
no, unless you actually need the alignment/padding for every field. You
declare the struct wrapping all the stuff you need and give that the aligned().

Attachment: pgp_sIBDY0rsj.pgp
Description: PGP signature

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to