1#ifndef TEST_OOM_LIB_H
2#define TEST_OOM_LIB_H
3
4#include <config.h>
5
6#ifdef HAVE_SYS_TYPES_H
7#include <sys/types.h>
8#endif
9
10void* test_malloc  (size_t      bytes);
11void* test_realloc (void       *memory,
12                    size_t      bytes);
13void  test_free    (void       *memory);
14char* test_strdup  (const char *str);
15
16/* returns true on success */
17typedef int (* TestMemoryFunction)  (void *data);
18
19/* returns true on success */
20int test_oom_handling (TestMemoryFunction  func,
21                       void               *data);
22
23/* get number of blocks leaked */
24int test_get_malloc_blocks_outstanding (void);
25
26#endif
27