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. --- scripts/cmapdump.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts') diff --git a/scripts/cmapdump.c b/scripts/cmapdump.c index c8ae8134..dc5d93e6 100644 --- a/scripts/cmapdump.c +++ b/scripts/cmapdump.c @@ -192,3 +192,8 @@ void fz_new_store_context(fz_context *ctx, unsigned int max) void fz_free_store_context(fz_context *ctx) { } + +int fz_store_scavenge(fz_context *ctx, unsigned int size, int *phase) +{ + return 0; +} -- cgit v1.2.3