[
https://issues.apache.org/jira/browse/QPID-5780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrew Stitcher updated QPID-5780:
----------------------------------
Description:
The C/C++ language rules allow compilers to add extra padding in the middle of
structs .Generally this is done to maintain the correct ABI alignment for the
members.
This means that by paying attention to the sizes of the members you can
eliminate the padding simply by putting the largest members (with the biggest
alignment constraint) first then the next then the next down to bitfields (if
you are using them).
Removing the padding can reduce the space used by structs and this can be
significant if enough of them are allocated.
was:
The C language rules allow compilers to add extra padding in the middle of
structs .Generally this is done to maintain the correct ABI alignment for the
members.
This means that by paying attention to the sizes of the members you can
eliminate the padding simply by putting the largest members (with the biggest
alignment constraint) first then the next then the next down to bitfields (if
you are using them).
Removing the padding can reduce the space used by structs and this can be
significant if enough of them are allocated.
Assignee: (was: Andrew Stitcher)
This bug was meant to be assigned to PROTON, however the same issues do apply
to QPID as well.
> Can Improve memory use by rearranging struct to remove padding holes
> --------------------------------------------------------------------
>
> Key: QPID-5780
> URL: https://issues.apache.org/jira/browse/QPID-5780
> Project: Qpid
> Issue Type: Improvement
> Reporter: Andrew Stitcher
> Priority: Minor
>
> The C/C++ language rules allow compilers to add extra padding in the middle
> of structs .Generally this is done to maintain the correct ABI alignment for
> the members.
> This means that by paying attention to the sizes of the members you can
> eliminate the padding simply by putting the largest members (with the biggest
> alignment constraint) first then the next then the next down to bitfields (if
> you are using them).
> Removing the padding can reduce the space used by structs and this can be
> significant if enough of them are allocated.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]