summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/marshal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/marshal.c b/Python/marshal.c
index d4755c9..e3619a6 100644
--- a/Python/marshal.c
+++ b/Python/marshal.c
@@ -70,7 +70,7 @@ w_more(int c, WFILE *p)
size = PyBytes_Size(p->str);
newsize = size + size + 1024;
if (newsize > 32*1024*1024) {
- newsize = size + 1024*1024;
+ newsize = size + (size >> 3); /* 12.5% overallocation */
}
if (_PyBytes_Resize(&p->str, newsize) != 0) {
p->ptr = p->end = NULL;