aboutsummaryrefslogtreecommitdiffstats
path: root/external/libxml2_android/jni/libxml2/testOOMlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'external/libxml2_android/jni/libxml2/testOOMlib.h')
-rw-r--r--external/libxml2_android/jni/libxml2/testOOMlib.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/external/libxml2_android/jni/libxml2/testOOMlib.h b/external/libxml2_android/jni/libxml2/testOOMlib.h
new file mode 100644
index 00000000..751999da
--- /dev/null
+++ b/external/libxml2_android/jni/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