summaryrefslogtreecommitdiff
path: root/include/mupdf/memento.h
AgeCommit message (Collapse)Author
2017-07-03Memento: pointer checking functions.Robin Watts
Add some helpful functions for doing quick checks on pointer validity. Use these in the reference counting functions.
2017-04-27memento: Don't include unnecessary headers.Tor Andersson
2017-03-29Happy New Year!Sebastian Rasmussen
2017-01-17Fix typos.Sebastian Rasmussen
2016-09-20Sync Memento with gs.Robin Watts
Including: Bug 697134: Tweak MEMENTO_GS_HACKS inclusion. Rather than rolling our own memset prototype in this case, use the one that gs provides. And, bug 697133: Fix typo in Memento. Causing a significant slowdown. Thanks to George Burgess IV for spotting this.
2016-09-16Add some missing #ifdeffery for Memento.Robin Watts
2016-09-14Fix typo in Memento header.Robin Watts
2016-09-13Update Memento for Android.Robin Watts
Add backtrace abilities, and fix missing return value from android logging.
2016-05-31memento.h: Replace memory.h with stdlib.hJoseph Heenan
memory.h isn't part of the C standard, and Xcode was getting upset when building mupdf as a module: error: include of non-modular header inside framework module 'MuPDF.mupdf.memento' [-Werror,-Wnon-modular-include-in-framework-module]
2016-03-28Memento: Add facility to cope with 'known' leaked blocks.Robin Watts
Harfbuzz allocates blocks that it keeps around as statics. There are a finite number of these, and they are never freed (at least not in the build we use). Having Memento report them as leaks is a pain. So we extend Memento so that we can label blocks as being leaks, and thus never have to be bothered by them.
2016-03-15Memento: Add Memento_{takeRef,dropRef,reference} functions.Robin Watts
These work with MEMENTO_DETAILS to allow us to store the events where reference counts change.
2016-03-10Memento: Pull in latest fixes from gs.Robin Watts
2016-03-03Memento: Speed improvements.Robin Watts
Avoid searching the linked list of blocks in order to remove a block by moving to a doubly linked list. This can be done without increasing the amount of memory in use by making better use of the 'parent' pointer that is only used when displaying nested blocks. Also store magic values in the 'child' and 'sibling' pointers (again only used when displaying nested blocks) so that we can quickly verify that a block is real before doing too much with it. Those changes drastically reduce the time required for MEMENTO_LEAKONLY runs (now the same order of magnitude as non memento runs). Normal memento runs are still very slow when the numbers of blocks increase due to the paranoid checking taking time. To ameliorate this a bit, we try 2 other things. Firstly, we optimise the searching of blocks by making use of int aligned tests. This still doesn't make much difference. Secondly, we introduce a new mechanism for the 'paranoia' levels. If a negative number is given for the paranoia level (say -n) then we first perform our overwrite checks after n events. We next test after 2n events, then 4n, then 8n etc. The new default paranoia level is set to be -1024. This makes a huge difference, and brings normal memento runs down to be comparable with debug runs.
2015-05-15Memento improvements.Robin Watts
Firstly, when displaying a list of nested blocks, don't suppress outputting a block just because it contains a pointer to itself. Various valgrind fixes from the gs version of memento. Experimental C++ operators. See writeup in memento.h comments for how to integrate.
2013-06-18Split fitz.h into subheaders.Tor Andersson
2013-06-18Move header files into separate include directory.Tor Andersson