lkml.org 
[lkml]   [2003]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectkmalloc alignment
Hi

Does the following property hold for kmalloc (2.4.x)?

Allocating a memory block of size: PAGE_SIZE >= 2^i >= 32 (or 64)
returns an address which is at least 2^i bytes aligned.

I flew over the code and as far as I can see the slabs are allocated
via __get_free_pages which returns PAGE_SIZE bytes aligned memory.
Since each slab allocates only blocks of the same size the property
follows immeadiately.

True or not?

Thanks for your help.
BTW, please cc your reply to my private e-mail since I'm currently
not subscribed.


Regards,

Thomas

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.041 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site