summaryrefslogtreecommitdiff
path: root/fitz/memento.c
AgeCommit message (Collapse)Author
2013-04-29Add Memento build option to Android build. Fix memory leaks.Robin Watts
Following up on a report from a potential customer, fix various places in mupdf.c where we were leaking memory (devices not freed, context not properly freed etc). In order to track this down, I added a Memento build - just do: ndk-build MEMENTO=1 when building. This only checks for leaks, not for memory overwrites by default as it uses MEMENTO_LEAKONLY to avoid any possibility of the android kernel killing stuff for being too slow or using too much memory.
2013-02-13Bump version number strings and dates for 1.2 release.Tor Andersson
2012-12-18Memento: Avoid stack overflows while listing leaked blocks.Robin Watts
Leaking long linked lists leads to stack overflows during the Memento debug output. Avoid this by iterating rather than recursing where possible. Also, for sanities sake, where we intent more than 40 spaces, use a single '*' instead. This keeps logfiles sane.
2012-08-23Update Memento to match the version in gs.Robin Watts
This brings in Memento_breakOnRealloc and Memento_breakOnFree along with some other small tweaks.
2012-02-03Remove extraneous blank lines.Tor Andersson
2012-01-20Ensure Memento checking is reflected in block numbersRobin Watts
2011-12-20More memsqueezing fixes.Robin Watts
One of the previous memsqueezing fixes (specifically that in close_dctd) appears to cause the Memento fork bases squeezing process to stop. This appears to be because old code would do a NULL dereference causing a SEGV. This would somehow NOT be picked up by the signal handler, and the child would exit. If the code is fixed to avoid the SEGV the code then somehow goes on to do something (not in the close_dctd code) that makes the mem squeeze process grind to a halt - but NOT in the same instance of the executable. I am at a loss to explain this, but would rather the code stays as it is (being as far as I can see correct) for now.
2011-12-19Add Memento 'pattern' code.Robin Watts
Disabled for now by default. Better SEGV handling under windows (to facilitate scripted squeezing)
2011-12-16Increase amount to search in blocks for nestings in memento.Robin Watts
Mupdf has some large structures (fz_shade is over 32K!), so to catch all pointers we need to search further than the 1K I was originally limiting ourselves to.
2011-12-16New Memento features; nesting of listed blocks, labelling of blocksRobin Watts
When listing blocks from Memento, look for internal pointers to other blocks, and use this to generate a nested list - much easier to read when looking to see which stray reference is causing blocks to leak. Add new Memento_label feature to allow blocks to be labelled. Makes block displaying much easier to read.
2011-12-15Memento tweak.Robin Watts
Slight memento tweak to simplify code (and correct problem with repeated event numbers when squeezing).
2011-12-15Various Memsqueezing fixes.Robin Watts
Fixes for leaks (and SEGVs, division by zeros etc) seen when Memsqueezing.
2011-12-15Add MEMENTO_MAXMEMORY (and Memento_setMax).Robin Watts
New Memento feature that enables us to easily test scavenging.
2011-12-15Bring Memento up to date with changes in gs.Robin Watts
Memento_listBlocks and Memento_listNewBlocks.
2011-12-08Stylistic changes when testing pointer values for NULL.Tor Andersson
Also: use 'cannot' instead of 'failed to' in error messages.
2011-10-04Move to exception handling rather than error passing throughout.Robin Watts
This frees us from passing errors back everywhere, and hence enables us to pass results back as return values. Rather than having to explicitly check for errors everywhere and bubble them, we now allow exception handling to do the work for us; the downside to this is that we no longer emit as much debugging information as we did before (though this could be put back in). For now, the debugging information we have lost has been retained in comments with 'RJW:' at the start. This code needs fuller testing, but is being committed as a work in progress.
2011-09-15Add context to mupdf.Robin Watts
Huge pervasive change to lots of files, adding a context for exception handling and allocation. In time we'll move more statics into there. Also fix some for(i = 0; i < function(...); i++) calls.
2011-09-14Add Memento build option.Robin Watts
Import memento files. Update Makefile to support: make build=memento (like debug, but with memento too). Tiny tweak to cmapdump to avoid memento building that utility.