diff options
Diffstat (limited to 'Python/marshal.c')
-rw-r--r-- | Python/marshal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/marshal.c b/Python/marshal.c index 6db46e4..140192f 100644 --- a/Python/marshal.c +++ b/Python/marshal.c @@ -67,7 +67,7 @@ w_more(int c, WFILE *p) size = PyString_Size(p->str); newsize = size + size + 1024; if (newsize > 32*1024*1024) { - newsize = size + 1024*1024; + newsize = size + (size >> 3); /* 12.5% overallocation */ } if (_PyString_Resize(&p->str, newsize) != 0) { p->ptr = p->end = NULL; |