diff options
author | Robin Watts <robin.watts@artifex.com> | 2011-12-15 17:13:56 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2011-12-15 17:13:56 +0000 |
commit | bfc3c9a207a57651cb62cf7dc63ae3b482543f3a (patch) | |
tree | e34bf8c424c476d084a2f03caacda6dd61d2a2da /scripts/cmapdump.c | |
parent | b5eb1f9c93d2ea25f811b6ccc378242f1a46f19e (diff) | |
download | mupdf-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/cmapdump.c')
-rw-r--r-- | scripts/cmapdump.c | 5 |
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; +} |