Kernel Data Alignment
Kernel Data Alignment
- Subject: Kernel Data Alignment
- From: "David Chatterton" <email@hidden>
- Date: Thu, 10 Jul 2003 09:43:36 +1000
We are having problems with data alignment of 64bit
types within structures. From the Mach-O docs, it
appears that MacOSX code defaults to the Power model
which does not align 64bit values on a 64bit boundary,
however other platforms we are communicating with do
and so our structures do not match.
Most Darwin structure appear not to use 64bit values,
size_t is 32bits for example. So is there any problem
with compiling our kext with align=natural and
interacting with kernel structures? A compiler option
is obviously easier than #pragma align=natural around
our OTW structures, or adding padding where needed.
We tried to use __attribute__((aligned(8))) without
much success, ie it made no difference. Is this expected
to work (it was used on the same code for an intel based
Linux with successs)?
And what about in 10.3 with more 64bit support? I'm
assuming that we will start to see more 64bit types
in the kernel, are there any plans regarding alignment?
Thanks,
David
---
David Chatterton Phone: +61 3 8530 7777
Adacel Technologies Fax: +61 3 9596 2960
email@hidden www.adacel.com/global
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.