title: How to do placement allocation Eigen::Matrix to Shared Memory (or Heap)?
body: <p>I just tried to allocate an instance which contains Eigen::Matrix to Xenomai's shared memory.</p>
  
  <pre><code>unsigned char * mem; //shared memory pointer
  Robot * robot = new ((void *)(mem+ROBOT_ADDR)) Robot();
  </code></pre>
  
  <p>The Robot class contains several Eigen::Matrix. However, I can't allocate robot object in my shared memory. </p>
  
  <p>But the basic allocation was working well lke below.</p>
  
  <pre><code>Robot * robot = new Robot(); //work well!
  </code></pre>
  
  <p>The Assertion log is:</p>
  
  <blockquote>
    <p>Eigen::internal::plain_array::plain_array() 
    [with T = double; int Size = 36; int MatrixOrArrayOptions = 0]: 
        Assertion `(reinterpret_cast(eigen_unaligned_array_assert_workaround_gcc47(array)) &amp; 0xf) == 0 
            &amp;&amp; "this assertion is explained here: " "<a href="http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html" rel="nofollow noreferrer">http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html</a>" " 
            **** READ THIS WEB PAGE !!! ****"' failed.</p>
  </blockquote>
  
  <p>I already checked the web page in the log. But there is no solution for my case.</p>
  
  <p>How to do placement allocation Eigen::Matrix to Shared Memory (or user-defined specific heap)?</p>