title: Linux shared memory: shmget() vs mmap()?
body: <p>In <a href="https://stackoverflow.com/questions/5656530/how-to-use-shared-memory-with-linux-in-c">this</a> thread the OP is suggested to use <code>mmap()</code> instead of <code>shmget()</code> to get shared memory in Linux.
  I visited <a href="http://www.cs.cf.ac.uk/Dave/C/node27.html" rel="noreferrer">this</a> page and <a href="http://www.jimscode.ca/index.php/component/content/article/13-c/45-c-simple-mmap-example" rel="noreferrer">this</a> page to get some documentation, but the second one gives an obscure example regarding <code>mmap()</code>.</p>
  
  <p>Being almost a newbie, and needing to share some information (in text form) between two processes, should I use the <code>shmget()</code> method or <code>mmap()</code>? And why?</p>