diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2016-10-19 18:22:05 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2016-10-19 18:22:05 (GMT) |
commit | 34be72f9ed749a5c013d3f7f47d810e8caf652cb (patch) | |
tree | 2f75b6050c088da53d774b3da3fb71e7fa49ec78 /libxml2/testOOMlib.h | |
parent | 604eac5688c5d437ed6d585ee63e53fba6f558c0 (diff) | |
parent | 0f851b6f17365c29b56d6a17564d58a33120508a (diff) | |
download | blt-34be72f9ed749a5c013d3f7f47d810e8caf652cb.zip blt-34be72f9ed749a5c013d3f7f47d810e8caf652cb.tar.gz blt-34be72f9ed749a5c013d3f7f47d810e8caf652cb.tar.bz2 |
Merge commit '0f851b6f17365c29b56d6a17564d58a33120508a' as 'libxml2'
Diffstat (limited to 'libxml2/testOOMlib.h')
-rw-r--r-- | libxml2/testOOMlib.h | 26 |
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 |