title: how to mmap() a queue?
body: <p>I have the following problem:</p>
  
  <p>I have created a queue. The addition of elements (malloc) are done by the main() function, and I have created a thread, which will process the elements/datum and free them. 
  This is a continuous process, and it will continue till I kill the process.</p>
  
  <p>Now, if I kill the process the data in the queue will be lost, so I was thinking about implementing mmap() on it. So that the queue is also stored in a regular file, and when I restart the process the data will be reload into memory for further processing by the thread...</p>
  
  <p>Since I am malloc'ing and free'ing memory, I suppose the mmapped file size will grow or reduce continuously.</p>
  
  <p>Now is this possible to implement or should I consider other options???</p>
  
  <p>Thanks.</p>
  
  <p>EDIT1: can I use lseek or ftruncate() to resize file?</p>