i think slab can do that,look at mm/slab.c: "struct kmem_cache * kmem_cache_create (const char *name, size_t size, size_t align, unsigned long flags, void (*ctor)(struct kmem_cache *, void *))" the parameter "align" for what? And kmalloc is page aligned, "4096/16 = 256", is it also 16 aligned? Maybe i misunderstand about "aligned" meaning. 2009/2/16 Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx>: > On Sun, Feb 15, 2009 at 4:41 PM, Ramagudi Naziir <naziirr@xxxxxxxxx> wrote: >> hello everyone >> >> i need to allocate memory aligned 16 bytes. >> >> how can i do that ? >> >> can I use kmalloc for that ? > > Uhm, kmalloc use slab so I don't think it will be aligned. My wild > guess is you have use alloc_page(s) or use _aligned_ (or _align_?... > not sure) gcc builtin directive > > regards, > > Mulyadi. > > -- > To unsubscribe from this list: send an email with > "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx > Please read the FAQ at http://kernelnewbies.org/FAQ > > -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ