title: Python, ctypes and mmap
body: <p>I am wondering if it is possible for the ctypes package to interface with mmap.</p>
  
  <p>Currently, my module allocates a buffer (with <code>create_string_buffer</code>) and then passes that using <code>byref</code> to my libraries <code>mylib.read</code> function. This, as the name suggests, reads data into the buffer. I then call <code>file.write(buf.raw)</code> to write the data to disk. My benchmarks, however, show this to be far from optimal (time spent in <code>file.write</code> is time better spent in <code>mylib.read</code>).</p>
  
  <p>I am therefore interested in knowing if ctypes can interoperate with mmap. Given an <code>mmap.mmap</code> instance and an offset how can I get a pointer (<code>c_void_p</code>) into the address space?</p>