summaryrefslogtreecommitdiffstats
path: root/libxml2/testOOMlib.h
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2016-11-17 21:10:17 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2016-11-17 21:10:17 (GMT)
commit8096d34300076a1aa9cb517de49fb920a051939f (patch)
tree5f2b1b7c41f89fedc31af973d6a747ca674cfd24 /libxml2/testOOMlib.h
parentfc7f7edd0b8011cb71573b15462ef83068d9e54b (diff)
parent574585fa78070b0cc6b5ad22543e21a3502a122b (diff)
downloadblt-8096d34300076a1aa9cb517de49fb920a051939f.zip
blt-8096d34300076a1aa9cb517de49fb920a051939f.tar.gz
blt-8096d34300076a1aa9cb517de49fb920a051939f.tar.bz2
Merge commit '574585fa78070b0cc6b5ad22543e21a3502a122b' as 'libxml2'
Diffstat (limited to 'libxml2/testOOMlib.h')
-rw-r--r--libxml2/testOOMlib.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/libxml2/testOOMlib.h b/libxml2/testOOMlib.h
new file mode 100644
index 0000000..751999d
--- /dev/null
+++ b/libxml2/testOOMlib.h
@@ -0,0 +1,26 @@
+#ifndef TEST_OOM_LIB_H
+#define TEST_OOM_LIB_H
+
+#include <config.h>
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+void* test_malloc (size_t bytes);
+void* test_realloc (void *memory,
+ size_t bytes);
+void test_free (void *memory);
+char* test_strdup (const char *str);
+
+/* returns true on success */
+typedef int (* TestMemoryFunction) (void *data);
+
+/* returns true on success */
+int test_oom_handling (TestMemoryFunction func,
+ void *data);
+
+/* get number of blocks leaked */
+int test_get_malloc_blocks_outstanding (void);
+
+#endif