title: Why is mmap returning a size of zero?
body: <p>I'm working on a beaglebone (running Angstrom Linux) and trying to use Python's <code>mmap</code> module to gain read and write access to the <code>/dev/mem</code> file.</p>
  
  <p>However, for some reason, the code below prints a value of zero. I'm fairly new to mmap and I'm not sure if there is something obvious I am missing.</p>
  
  <pre><code>from mmap import mmap
  
  mmap_offset=0x44c00000
  mmap_size=0x48ffffff-mmap_offset
  
  with open("/dev/mem", "r+b") as f:
      testMap=mmap(f.fileno(),mmap_size,offset=mmap_offset)
  
  print testMap.size()
  print testMap[0]
  </code></pre>
  
  <p>returns:</p>
  
  <pre><code>0
  8
  </code></pre>