Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b368604d9b
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 27 lines (19 sloc) 0.623 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 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
Something went wrong with that request. Please try again.