summaryrefslogtreecommitdiff
path: root/gs/base/memento.h
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2012-03-09 16:57:13 +0000
committerChris Liddell <chris.liddell@artifex.com>2012-03-15 11:54:24 +0000
commit4cfdf19ff915d29bb06771c803d0b08aa6b101bc (patch)
treeecda8fd37ab7bb479a6e4b3f473f7982fa9a013f /gs/base/memento.h
parentde2645aaa39c02907cdf735001a42be3852d7107 (diff)
Updated Memento pulled in from mupdf. Plus nesting fixes.
Bring in Memento from MuPDF (where it has had some more tweaks added). Fix the nested display code. Add hack to ignore prev/next pointers in chunk blocks. CLUSTER_UNTESTED.
Diffstat (limited to 'gs/base/memento.h')
-rw-r--r--gs/base/memento.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/gs/base/memento.h b/gs/base/memento.h
index 13ce6cc16..e4b7778f0 100644
--- a/gs/base/memento.h
+++ b/gs/base/memento.h
@@ -15,7 +15,7 @@
*
* Usage:
* First, build your project with MEMENTO defined, and include this
- * header file whereever you use malloc, realloc or free.
+ * header file wherever you use malloc, realloc or free.
* This header file will use macros to point malloc, realloc and free to
* point to Memento_malloc, Memento_realloc, Memento_free.
*
@@ -58,7 +58,7 @@
* the the code will wait until it reaches that event and then start
* checking the heap after every allocation event. Assuming it is a
* deterministic failure, you should then find out where in your program
- * the error is occuring (between event x-1 and event x).
+ * the error is occurring (between event x-1 and event x).
*
* Then you can rerun the program again, and call
* Memento_breakAt(int event); and the program will call
@@ -134,7 +134,7 @@
#ifndef MEMENTO_H
-#include "std.h"
+#include <memory.h>
#define MEMENTO_H
@@ -174,9 +174,11 @@ int Memento_find(void *a);
void Memento_breakpoint(void);
int Memento_failAt(int);
int Memento_failThisEvent(void);
-
void Memento_listBlocks(void);
void Memento_listNewBlocks(void);
+size_t Memento_setMax(size_t);
+void Memento_stats(void);
+void *Memento_label(void *, const char *);
void *Memento_malloc(size_t s);
void *Memento_realloc(void *, size_t s);
@@ -212,6 +214,9 @@ void *Memento_calloc(size_t, size_t);
#define Memento_failThisEvent() 0
#define Memento_listBlocks() do {} while (0)
#define Memento_listNewBlocks() do {} while (0)
+#define Memento_setMax(A) 0
+#define Memento_stats() do {} while (0)
+#define Memento_label(A,B) (A)
#endif /* MEMENTO */