Aligning on some odd address?

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

 



Hello everybody,

I'd like to know whether there's some way to get a structure aligned on a non-
aligned address.
Now that might sound a bit strange, but let me explain.

I'm having a lot of (constant) structures that include a count an an array, 
like this:

	struct {
		unsigned char count;
		struct something_else_t array[];
	}

Now I'd like to have the array (where each element has eg. 16, 32, or 48 
bytes) aligned - on at least a 4 byte boundary, but better still on 8/16/64 
bytes.

Is there some way to do that, *without* loosing much memory?
Optimally there'd be some way to get such structures put after static strings 
(which might end on an odd address anyway), so that the total memory lost 
would be a low as possible.

So, concluding: How can I specify that I want some member of a *packed* 
structure aligned, but not the structure itself?

Thank you for any help.


Regards,

Phil


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux