1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 20:25:14 +03:00
libxml2/testOOMlib.h

23 lines
568 B
C
Raw Normal View History

#ifndef TEST_OOM_LIB_H
#define TEST_OOM_LIB_H
2022-03-04 04:31:59 +03:00
#include <stddef.h>
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