title: memory heap allocator library that keeps separate structures?
body: <p>Here's my problem: I need to manage memory in a remote contiguous buffer that my program can't read or write to. It needs to have malloc()/free() semantics, and support setting minimum alignment, and fragmentation avoidance (whenever possible). Since I can't read or write to this buffer directly, I need to use local structures to manage all the allocations.</p>
  
  <p>I am already using boost, so if something inside boost can be massaged to do this, that would be great. However, I'm not averse to using a C library or anything like that. </p>
  
  <p>As an example, I need a non-IPC version  of:</p>
  
  <pre><code>boost::interprocess::basic_managed_external_buffer&lt;
                       char,
                       boost::interprocess::rbtree_best_fit&lt;
                                            boost::interprocess::mutex_family,
                                            boost::interprocess::offset_ptr&lt;void&gt;,
                                            SOME_ALIGNMENT&gt;,
                       boost::interprocess::iset_index&gt;
  </code></pre>
  
  <p>preferably with malloc/free semantics instead of new/delete
  but without it ever actually reading or writing to the underlying buffer (and keeping all the allocation information/data structures in a separate buffer)</p>
  
  <p>Any ideas?</p>
  
  <p>P.S. I don't want the boost::interprocess example to be misleading, I am just familiar with the interface so using it as an example. The application is not really interprocess, and the allocator would only be used from my application.</p>
  
  <p>Specifically I would like to be able to manage a 16GB external buffer with allocation sizes from 128 bytes all the way to 512MB. This is strictly 64-bit code, but even then I would prefer the pointer type to be a template parameter so I can use uint64_t explicitly.</p>