summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@hotmail.com>2009-05-03 20:56:07 +0200
committerSebastian Rasmussen <sebras@hotmail.com>2009-05-03 20:56:07 +0200
commit2d9337b2d962cd4fdc187eca12765659fc4a0e5b (patch)
tree2d8fa61cc14c1cd4931f6b2df21a8de68ca90264
parent35840103638f6455ccb2fb04bdfe5c2754b124e3 (diff)
downloadmupdf-2d9337b2d962cd4fdc187eca12765659fc4a0e5b.tar.xz
Allocate space for more pages to alleviate unnecessary reallocs.
-rw-r--r--mupdf/pdf_pagetree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mupdf/pdf_pagetree.c b/mupdf/pdf_pagetree.c
index 9760e872..91ac887f 100644
--- a/mupdf/pdf_pagetree.c
+++ b/mupdf/pdf_pagetree.c
@@ -81,7 +81,7 @@ loadpagetree(pdf_xref *xref, pdf_pagetree *pages,
{
fz_warn("initial page tree size too small, enlarging");
- pages->count = pages->cursor + 1;
+ pages->count = pages->cursor + 10;
pages->pref = fz_realloc(pages->pref, sizeof(fz_obj*) * pages->count);
pages->pobj = fz_realloc(pages->pobj, sizeof(fz_obj*) * pages->count);
}