commit | 405f614af978576586ef5aa2444cfa30ae132284 | [log] [tgz] |
---|---|---|
author | Gustavo Sverzut Barbieri <barbieri@profusion.mobi> | Thu Dec 08 14:36:30 2011 -0200 |
committer | Gustavo Sverzut Barbieri <barbieri@profusion.mobi> | Thu Dec 08 14:38:22 2011 -0200 |
tree | 39fe3c702a0e3ad76a1fac3d418b0b667b214556 | |
parent | e18ad35c640d67484d96c1ab71253ba1f69cc805 [diff] |
index: improve buffer management and reduce mallocs. Grow buffer based on a step, avoiding hitting the system over and over again. Do not allocate the 'struct buffer' as in all cases the lifetime is known and the pattern was allocate then free in every call site.