title: What are the usage differences between size_t and off_t?
body: <p>Other than the size of the values that each type can hold, what are the main differences in <strong>usage</strong> between <code>size_t</code> and <code>off_t</code>? Is it just a convention that <code>size_t</code> types are used for absolute sizes and <code>off_t</code> types are used for offsets? Or does it go deeper than that?</p>
  
  <p>I am writing a wrapper class to enable the writing of large files using <code>mmap</code> and I want to know what the best types are to use for their arguments. Given that I want to write to files > 4GB, I'm tempted to use size_t for everything, but is that the best practice? (or should I be using some <code>off64_t</code> types for certain functions?)</p>
  
  <p>For example, should my <code>writeAt</code> function be declared as:</p>
  
  <pre><code>MMapWriter::writeAt(off64_t offset, const void* src, size_t size)
  </code></pre>
  
  <p>or</p>
  
  <pre><code>MMapWriter::writeAt(size_t offset, const void* src, size_t size)
  </code></pre>