Re: the memory align about return value of kmalloc?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nope. kmalloc uses slab allocator underneath it. So, No addresses will
not be 4k aligned.

If you care about 4k aligned addresses you should use
__get_free_page() rather than kmalloc().
kmalloc's are used for small allocations - think about wastage of
memory if we try to place 4k alignment
requirements.



Shailesh Jain




On Sat, Jul 24, 2010 at 11:45 PM, vichy <vichy.kuo@xxxxxxxxx> wrote:
> Dear all:
> if I remember correctly, the address alignment of the address what
> kmalloc rerutn is 4k bytes, right?
> if I am wrong, please tell me where I can find the document.
> appreciate your help,
> vichy
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>



-- 
Shailesh Jain

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux