Hi Yevgeni, Even on architectures that support misaligned access, such access will be slower and non-atomic.
Usually it is possible to change the code which initially receives the message in such a way that it will end up always aligned. When possible, this is usually a much better solution than taking a portability and performance hit. How are you reading the messages in your case such that they don't end up aligned? -Kenton On Thu, Jul 28, 2016 at 12:52 PM, <[email protected]> wrote: > When creating a FlatArrayMessageReader from a buffer which is not aligned, > I am getting an assertion violation: "Pointer section of struct list > element not aligned." > > I was reading this discussion on the matter: > https://groups.google.com/forum/#!msg/capnproto/RPqMlhkSdeo/z2O6JgztBAAJ > > I failed to understand however, whether anything will break within > capnproto library if non-aligned buffers are used or is this just a > protection for some architectures against SIGBUS violations? > I would really like to avoid memory copies just for the purpose of > alignment especially that my CPU architecture supports misaligned access. > > Do you think the assertion at external/capnproto/c++/src/capnp/layout.c++:2732 > should be changed? > > Thanks, > > - Yevgeni > > -- > You received this message because you are subscribed to the Google Groups > "Cap'n Proto" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > Visit this group at https://groups.google.com/group/capnproto. > -- You received this message because you are subscribed to the Google Groups "Cap'n Proto" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/capnproto.
