diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2016-11-17 21:10:17 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2016-11-17 21:10:17 (GMT) |
commit | 574585fa78070b0cc6b5ad22543e21a3502a122b (patch) | |
tree | 0e96ee0e38f68bcd7662e7815f96e0151740056f /testOOMlib.h | |
download | blt-574585fa78070b0cc6b5ad22543e21a3502a122b.zip blt-574585fa78070b0cc6b5ad22543e21a3502a122b.tar.gz blt-574585fa78070b0cc6b5ad22543e21a3502a122b.tar.bz2 |
Squashed 'libxml2/' content from commit d9321d2
git-subtree-dir: libxml2
git-subtree-split: d9321d23d75a97f655f9325007ea7837f101100f
Diffstat (limited to 'testOOMlib.h')
-rw-r--r-- | testOOMlib.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/testOOMlib.h b/testOOMlib.h new file mode 100644 index 0000000..751999d --- /dev/null +++ b/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 |