UYS
0.1
Useful Yet Simple (C libraries collection)
Main Page
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Typedefs
Macros
Pages
uys_alloc.c
1
#include <stdint.h>
2
#include <stdlib.h>
3
4
#include "uys_alloc.h"
5
6
7
int
UYS_MAKE_MALLOC_FAIL = 0;
8
void
* uys_malloc_test_fn(
size_t
size) {
9
if
(UYS_MAKE_MALLOC_FAIL)
10
return
NULL;
11
return
malloc(size);
12
}
13
14
void
uys_set_malloc_to_fail(
int
status) {
15
UYS_MAKE_MALLOC_FAIL = status;
16
}
src
uys_alloc.c
Generated on Fri Nov 24 2017 11:41:02 for UYS by
1.8.6