summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2011-12-15 17:13:56 +0000
committerRobin Watts <robin.watts@artifex.com>2011-12-15 17:13:56 +0000
commitbfc3c9a207a57651cb62cf7dc63ae3b482543f3a (patch)
treee34bf8c424c476d084a2f03caacda6dd61d2a2da /scripts
parentb5eb1f9c93d2ea25f811b6ccc378242f1a46f19e (diff)
downloadmupdf-bfc3c9a207a57651cb62cf7dc63ae3b482543f3a.tar.xz
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.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmapdump.c5
1 files changed, 5 insertions, 0 deletions
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;
+}