Re: [linux-usb] Re: How to get aligned memory?

Stephen Williams (
Fri, 31 Jul 1998 11:37:57 -0700 said:
> P.S. Malloc usually returns 16-byte aligned stuff. (At least when I
> wrote the darn thing :-)

A correct malloc must return memory aligned for any C data type. That
usually means double, and for 32bit machines that tends to imply 8 bytes.
(I've written mallocs with 4byte alignment, and regretted it:-)

kmalloc (getting back on topic) doesn't need to consider floating types,
but probably does anyhow. If you need a pool of highly aligned objects,
might I suggess getting a few pages and writing a simple fixed-size-object

Steve Williams                "The woods are lovely, dark and deep.              But I have promises to keep,            and lines to code before I sleep,       And lines to code before I sleep."

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to Please read the FAQ at