[Asterisk-Dev] Re: asterisk/include/asterisk utils.h,1.46,1.47
Kevin P. Fleming
kpfleming at digium.com
Sun Oct 30 11:42:57 MST 2005
Thorsten Lockert wrote:
> At the same time, many platforms (particularly non-Intel) are actually
> more efficient handling 'int' sized variables than 'short' sized
> ones... Whether you actually need/use 32+ bits or not...
This is true for all modern platforms, actually. As Luigi Rizzo has
already pointed out, on an X86 32-bit system the compiler will still
allocate 4 bytes on the stack for a 'short' passed by value if the
surrounding arguments have 4-byte alignment requirements. It may do so
even then there are no alignment issues, for optimization purposes.
Of course, this make little different on platforms where there are
adequate registers for the arguments to be passed in, since they won't
be placed on the stack in that case.
More information about the asterisk-dev
mailing list