title: Creating and Accessing a struct in shared memory
body: <p>If I have some struct</p>
  
  <pre><code>struct processData{
      int *a;
      int *b;
  }
  </code></pre>
  
  <p>And I set up my shared memory ID as</p>
  
  <pre><code>int shmid = shmget(1234, sizeof(processData), IPC_CREAT | 0666);
  </code></pre>
  
  <p>Where 1234 is my key</p>
  
  <p>Would I set up my actual shared struct like this..</p>
  
  <pre><code>processData* pData =(processData *) shmat(shmid, NULL, 0);
  </code></pre>
  
  <p>And then shouldn't I be able to change things around in seperate processes like:</p>
  
  <pre><code>pData -&gt; a = SOME_NUMBER;
  </code></pre>
  
  <p>When I do this, all of my processes aren't interacting with the same piece of memory and I'm clueless why. </p>