title: Causes of gzopen() leading to ENOMEM
body: <p>I have a program whose total memory footprint is about 100 MiB (VM size, in top, while stopped in <code>gdb</code>) that's trying to open a new (not-yet-existent) compressed log file using <code>gzopen</code>. This fails, with <code>errno</code> set to <code>ENOMEM</code>, despite the fact that the system has 6GB memory completely free (not even holding caches), and lots of space on the filesystem (that would be <code>ENOSPC</code>, I know). Are there more obscure issues that could cause this? Is something in the library incidentally allocating gigabytes upon gigabytes of memory for no good reason?</p>
  
  <p>For note, my ulimits are set unlimited.</p>