diff options
author | Damien George <damien.p.george@gmail.com> | 2016-02-01 21:30:18 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-04-18 15:09:34 +0100 |
commit | 2d9531a777e01c982ce8f2e5867b05bbac74373c (patch) | |
tree | 12cf4236684aaeab6a464a515269231d5c4d21db | |
parent | 238b5f5f891838de04faa1bd0718c069e14cc1fa (diff) | |
download | micropython-2d9531a777e01c982ce8f2e5867b05bbac74373c.tar.gz micropython-2d9531a777e01c982ce8f2e5867b05bbac74373c.zip |
py/vstr: Change allocation policy from *2 to +64.
-rw-r--r-- | py/vstr.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -151,7 +151,7 @@ STATIC bool vstr_ensure_extra(vstr_t *vstr, size_t size) { if (vstr->fixed_buf) { return false; } - size_t new_alloc = ROUND_ALLOC((vstr->len + size) * 2); + size_t new_alloc = ROUND_ALLOC((vstr->len + size) + 64); char *new_buf = m_renew(char, vstr->buf, vstr->alloc, new_alloc); if (new_buf == NULL) { vstr->had_error = true; |