From: Thomas Heinz <thomasheinz@gmx.net>
To: linux-kernel@vger.kernel.org
Subject: kmalloc alignment
Date: Tue, 06 May 2003 00:03:11 +0200 [thread overview]
Message-ID: <3EB6DF9F.7050907@gmx.net> (raw)
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
next reply other threads:[~2003-05-05 21:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-05 22:03 Thomas Heinz [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-03-04 22:41 kmalloc() alignment Manfred Spraul
2001-03-06 0:06 ` Kenn Humborg
2001-03-06 0:15 ` H. Peter Anvin
2001-03-06 0:29 ` Kenn Humborg
2001-03-06 2:14 ` Alan Cox
2001-03-06 5:05 ` H. Peter Anvin
2001-03-06 8:31 ` Rogier Wolff
2001-03-06 12:10 ` Xavier Bestel
2001-03-04 22:17 Kenn Humborg
2001-03-04 22:34 ` Alan Cox
2001-03-05 9:40 ` Rogier Wolff
2001-03-05 13:24 ` Alan Cox
2001-03-05 13:22 ` Rogier Wolff
2001-03-06 8:59 ` Philipp Rumpf
2001-03-06 12:14 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3EB6DF9F.7050907@gmx.net \
--to=thomasheinz@gmx.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox