title: Alignment of structure members for heap allocated variables
body: <p>I have a structure where the members have certain alignment requirements while no such requirement exist for the structure itself. </p>
  
  <p>I'm using gcc so using __attribute__((aligned(n))) will do the trick, unless (as far as I know) an instance of the struct is allocated on the heap.</p>
  
  <p>How do I keep the alignment for heap allocated instances? posix_memalign(3) will align the structure itself, but not the structure members, so I can't see how to make it work with that function.</p>
  
  <p>The source is here: <a href="https://github.com/colding/disruptorC/blob/master/src/disruptor.h#L92" rel="nofollow">https://github.com/colding/disruptorC/blob/master/src/disruptor.h#L92</a></p>