mirror of
https://github.com/darlinghq/darling-libxml2.git
synced 2024-12-02 17:26:24 +00:00
a76fe5ca11
* Makefile.am testOOM.c testOOMlib.[ch] : integrated the Out Of Memory test from Havoc Pennington #109368 * SAX.c parser.c parserInternals.c tree.c uri.c valid.c xmlmemory.c xmlreader.c xmlregexp.c include/libxml/tree.h include/libxml/parser.h: a lot of memory allocation cleanups based on the results of the OOM testing * check-relaxng-test-suite2.py: seems I forgot to commit the script. Daniel
27 lines
623 B
C
27 lines
623 B
C
#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
|