Home | History | Annotate | Download | only in libxml2
      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 
     10 void* test_malloc  (size_t      bytes);
     11 void* test_realloc (void       *memory,
     12                     size_t      bytes);
     13 void  test_free    (void       *memory);
     14 char* test_strdup  (const char *str);
     15 
     16 /* returns true on success */
     17 typedef int (* TestMemoryFunction)  (void *data);
     18 
     19 /* returns true on success */
     20 int test_oom_handling (TestMemoryFunction  func,
     21                        void               *data);
     22 
     23 /* get number of blocks leaked */
     24 int test_get_malloc_blocks_outstanding (void);
     25 
     26 #endif
     27