From bfc3c9a207a57651cb62cf7dc63ae3b482543f3a Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Thu, 15 Dec 2011 17:13:56 +0000 Subject: Add scavenging functionality. When fz_malloc (etc) are about to fail, we try to scavenge memory from the store and then retry. We repeatedly try to bin objects from the store until the malloc succeeds, or until we have nothing else to bin. This means we no longer need the 'aging' of the store, so this is removed. --- apps/pdfapp.c | 2 -- apps/pdfdraw.c | 2 -- 2 files changed, 4 deletions(-) (limited to 'apps') diff --git a/apps/pdfapp.c b/apps/pdfapp.c index c1e026fe..849b0d18 100644 --- a/apps/pdfapp.c +++ b/apps/pdfapp.c @@ -342,8 +342,6 @@ static void pdfapp_loadpage_pdf(pdfapp_t *app) fz_free_device(mdev); pdf_free_page(app->ctx, page); - - fz_age_store(app->ctx, 3); } static void pdfapp_loadpage_xps(pdfapp_t *app) diff --git a/apps/pdfdraw.c b/apps/pdfdraw.c index f7867bf0..1e71181e 100644 --- a/apps/pdfdraw.c +++ b/apps/pdfdraw.c @@ -263,8 +263,6 @@ static void drawpage(pdf_xref *xref, int pagenum) if (showmd5 || showtime) printf("\n"); - fz_age_store(ctx, 3); - fz_flush_warnings(ctx); } -- cgit v1.2.3