Question on Alignment

anish singh anish198519851985 at gmail.com
Sun Nov 3 12:42:15 EST 2013


Don't top post.


On Sun, Nov 3, 2013 at 9:29 AM, Omkar Houddin <ophouddin22 at gmail.com> wrote:
>
> Sorry I meant 32 byte....!!!

Mostly memory returned from kmalloc is aligned for generic
data types but incase you want to set it explicitly you can
use below macro:

ALIGN(returned_memory, 32);


>
>
>
> On Sat, Nov 2, 2013 at 9:20 PM, anish singh <anish198519851985 at gmail.com> wrote:
>>
>>
>>
>>
>> On Sat, Nov 2, 2013 at 7:42 PM, Shyam Sunkara <ophouddin22 at gmail.com> wrote:
>>>
>>> Hi All,
>>>
>>> I'm allocating a memory for linux driver using the kmalloc and I need to align it to 32 bit how do I do it?
>>
>> Did you mean 32 bit or byte?
>>>
>>>
>>>
>>> Thank you,
>>>
>>> Regards,
>>> Omk
>>>
>>> _______________________________________________
>>> Kernelnewbies mailing list
>>> Kernelnewbies at kernelnewbies.org
>>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>>
>>
>



More information about the Kernelnewbies mailing list