Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solaris/Sparc 8-byte alignment #17

Open
jknotts opened this issue Apr 28, 2017 · 1 comment
Open

Solaris/Sparc 8-byte alignment #17

jknotts opened this issue Apr 28, 2017 · 1 comment

Comments

@jknotts
Copy link

jknotts commented Apr 28, 2017

I am currently working on a project where I will be using this on Solaris/Sparc 32-bit and I wanted to understand why there is a requirement for 8-byte alignment on the data, len, and cap fields in the struct capn_segment. As of right now, the call to ALIGNED in struct ALIGNED_(8) capn_segment fails. Thank you in advance!

@eqvinox
Copy link

eqvinox commented May 13, 2017

Cap'n Proto pointers (in the encoded binary result) have a granularity of 8 bytes (cf. https://capnproto.org/encoding.html), and the C implementation's in-memory layout is tied to the binary encoding. Hence, structures must be aligned to 8 bytes...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants